comparison 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
comparison
equal deleted inserted replaced
5569:9e209193f18d 5570:78a6b985882f
607 if node is None: 607 if node is None:
608 # tip of current branch 608 # tip of current branch
609 try: 609 try:
610 node = repo.branchtags()[wc.branch()] 610 node = repo.branchtags()[wc.branch()]
611 except KeyError: 611 except KeyError:
612 raise util.Abort(_("branch %s not found") % wc.branch()) 612 if wc.branch() == "default": # no default branch!
613 node = repo.lookup("tip") # update to tip
614 else:
615 raise util.Abort(_("branch %s not found") % wc.branch())
613 overwrite = force and not branchmerge 616 overwrite = force and not branchmerge
614 forcemerge = force and branchmerge 617 forcemerge = force and branchmerge
615 pl = wc.parents() 618 pl = wc.parents()
616 p1, p2 = pl[0], repo.changectx(node) 619 p1, p2 = pl[0], repo.changectx(node)
617 pa = p1.ancestor(p2) 620 pa = p1.ancestor(p2)