mercurial/revlog.py
changeset 39831 7a9e2d85f475
parent 39778 a6b3c4c1019f
child 39842 97986c9c69d3
equal deleted inserted replaced
39830:e5871e8fbb57 39831:7a9e2d85f475
  1323     def shortest(self, node, minlength=1):
  1323     def shortest(self, node, minlength=1):
  1324         """Find the shortest unambiguous prefix that matches node."""
  1324         """Find the shortest unambiguous prefix that matches node."""
  1325         def isvalid(prefix):
  1325         def isvalid(prefix):
  1326             try:
  1326             try:
  1327                 node = self._partialmatch(prefix)
  1327                 node = self._partialmatch(prefix)
  1328             except error.RevlogError:
  1328             except error.AmbiguousPrefixLookupError:
  1329                 return False
  1329                 return False
  1330             except error.WdirUnsupported:
  1330             except error.WdirUnsupported:
  1331                 # single 'ff...' match
  1331                 # single 'ff...' match
  1332                 return True
  1332                 return True
  1333             if node is None:
  1333             if node is None: