Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 5570:78a6b985882f
update: default to tipmost branch if default branch doesn't exist
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 02 Dec 2007 15:15:49 -0600 |
parents | 3ab405e070bb |
children | 1ce185f3c640 |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Dec 02 13:37:30 2007 -0600 +++ b/mercurial/merge.py Sun Dec 02 15:15:49 2007 -0600 @@ -609,7 +609,10 @@ try: node = repo.branchtags()[wc.branch()] except KeyError: - raise util.Abort(_("branch %s not found") % wc.branch()) + if wc.branch() == "default": # no default branch! + node = repo.lookup("tip") # update to tip + else: + raise util.Abort(_("branch %s not found") % wc.branch()) overwrite = force and not branchmerge forcemerge = force and branchmerge pl = wc.parents()