# HG changeset patch # User Matt Mackall # Date 2007-12-02 21:15:49 # Node ID 78a6b985882f4221f9a7a05744bbdb95eb5aeaec # Parent 9e209193f18dbaf07a787a5d4809ac39c23ec2d3 update: default to tipmost branch if default branch doesn't exist diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -609,7 +609,10 @@ def update(repo, node, branchmerge, forc 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()