changeset 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 7307d2e98b32
children fc12ac3755d5
files mercurial/commands.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2544,7 +2544,11 @@ def _lookup(repo, node, branch=None):
         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):