# HG changeset patch # User Brendan Cully # Date 1173576987 28800 # Node ID a2335e832e16ba07358ee734fbb8dabc9523da46 # Parent 7307d2e98b322ed80a07aad758225a4ced2a6305 Make update with no node jump to the tip of the current branch diff -r 7307d2e98b32 -r a2335e832e16 mercurial/commands.py --- a/mercurial/commands.py Sat Mar 10 22:03:23 2007 -0300 +++ b/mercurial/commands.py Sat Mar 10 17:36:27 2007 -0800 @@ -2544,7 +2544,11 @@ else: raise util.Abort(_("branch %s not found") % branch) else: - node = node and repo.lookup(node) or repo.changelog.tip() + if node: + node = repo.lookup(node) + else: + wc = repo.workingctx() + node = repo.branchtags()[wc.branch()] return node def verify(ui, repo):