revlog: make lookup handle binary nodes
authorMatt Mackall <mpm@selenic.com>
Wed, 28 Jun 2006 16:52:42 -0500
changeset 2561 494f7787d8ee
parent 2560 c35694df7b13
child 2562 a020024c5870
revlog: make lookup handle binary nodes
mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Jun 28 15:49:33 2006 -0500
+++ b/mercurial/revlog.py	Wed Jun 28 16:52:42 2006 -0500
@@ -743,6 +743,8 @@
 
     def lookup(self, id):
         """locate a node based on revision number or subset of hex nodeid"""
+        if id in self.nodemap:
+            return id
         if type(id) == type(0):
             rev = id
             if rev < 0: rev = self.count() + rev