mercurial/localrepo.py
changeset 7377 374a6b3ac623
parent 7361 9fe97eea5510
child 7415 6163ef936a00
--- a/mercurial/localrepo.py	Fri Nov 14 14:12:16 2008 -0600
+++ b/mercurial/localrepo.py	Fri Nov 14 14:12:43 2008 -0600
@@ -437,10 +437,14 @@
             partial[b] = c.node()
 
     def lookup(self, key):
-        if key == '.':
+        if isinstance(key, int):
+            return self.changelog.node(key)
+        elif key == '.':
             return self.dirstate.parents()[0]
         elif key == 'null':
             return nullid
+        elif key == 'tip':
+            return self.changelog.tip()
         n = self.changelog._match(key)
         if n:
             return n