Mercurial > public > mercurial-scm > hg-stable
diff hgext/fetch.py @ 2808:30f59f4a327e
Introduce update helper functions: update, merge, clean, and revert
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 07 Aug 2006 22:54:33 -0500 |
parents | 90a4181ca9ed |
children | 49988d9f0758 |
line wrap: on
line diff
--- a/hgext/fetch.py Mon Aug 07 22:35:36 2006 -0500 +++ b/hgext/fetch.py Mon Aug 07 22:54:33 2006 -0500 @@ -24,19 +24,19 @@ if modheads == 0: return 0 if modheads == 1: - return commands.doupdate(ui, repo) + return hg.update(repo, repo.changelog.tip()) newheads = repo.heads(parent) newchildren = [n for n in repo.heads(parent) if n != parent] newparent = parent if newchildren: - commands.doupdate(ui, repo, node=hex(newchildren[0])) + hg.update(repo, newchildren[0]) newparent = newchildren[0] newheads = [n for n in repo.heads() if n != newparent] err = False if newheads: ui.status(_('merging with new head %d:%s\n') % (repo.changelog.rev(newheads[0]), short(newheads[0]))) - err = hg.update(repo, newheads[0], allow=True, remind=False) + err = hg.merge(repo, newheads[0], remind=False) if not err and len(newheads) > 1: ui.status(_('not merging with %d other new heads ' '(use "hg heads" and "hg merge" to merge them)') %