comparison mercurial/commands.py @ 4175:a2335e832e16

Make update with no node jump to the tip of the current branch
author Brendan Cully <brendan@kublai.com>
date Sat, 10 Mar 2007 17:36:27 -0800
parents 30857b5779f8
children ba51a8225a60 e8ee8fdeddb1 f9bbcebcacea
comparison
equal deleted inserted replaced
4174:7307d2e98b32 4175:a2335e832e16
2542 repo.ui.warn(_("Using head %s for branch %s\n") 2542 repo.ui.warn(_("Using head %s for branch %s\n")
2543 % (short(node), branch)) 2543 % (short(node), branch))
2544 else: 2544 else:
2545 raise util.Abort(_("branch %s not found") % branch) 2545 raise util.Abort(_("branch %s not found") % branch)
2546 else: 2546 else:
2547 node = node and repo.lookup(node) or repo.changelog.tip() 2547 if node:
2548 node = repo.lookup(node)
2549 else:
2550 wc = repo.workingctx()
2551 node = repo.branchtags()[wc.branch()]
2548 return node 2552 return node
2549 2553
2550 def verify(ui, repo): 2554 def verify(ui, repo):
2551 """verify the integrity of the repository 2555 """verify the integrity of the repository
2552 2556