mercurial/revlog.py
changeset 37767 44d1959acb3b
parent 37494 1ce7a55b09d1
child 37819 ee3d58b4a47f
--- a/mercurial/revlog.py	Fri Apr 06 11:13:47 2018 -0400
+++ b/mercurial/revlog.py	Mon Apr 16 23:29:09 2018 -0700
@@ -1500,8 +1500,8 @@
 
         raise LookupError(id, self.indexfile, _('no match found'))
 
-    def shortest(self, hexnode, minlength=1):
-        """Find the shortest unambiguous prefix that matches hexnode."""
+    def shortest(self, node, minlength=1):
+        """Find the shortest unambiguous prefix that matches node."""
         def isvalid(test):
             try:
                 if self._partialmatch(test) is None:
@@ -1523,6 +1523,7 @@
                 # single 'ff...' match
                 return True
 
+        hexnode = hex(node)
         shortest = hexnode
         startlength = max(6, minlength)
         length = startlength