mercurial/revlog.py
changeset 7874 d812029cda85
parent 7873 4a4c7f6a5912
child 7883 c63c30ae9e39
equal deleted inserted replaced
7873:4a4c7f6a5912 7874:d812029cda85
   833         if len(id) == 20:
   833         if len(id) == 20:
   834             # possibly a binary node
   834             # possibly a binary node
   835             # odds of a binary node being all hex in ASCII are 1 in 10**25
   835             # odds of a binary node being all hex in ASCII are 1 in 10**25
   836             try:
   836             try:
   837                 node = id
   837                 node = id
   838                 r = self.rev(node) # quick search the index
   838                 self.rev(node) # quick search the index
   839                 return node
   839                 return node
   840             except LookupError:
   840             except LookupError:
   841                 pass # may be partial hex id
   841                 pass # may be partial hex id
   842         try:
   842         try:
   843             # str(rev)
   843             # str(rev)
   853             pass
   853             pass
   854         if len(id) == 40:
   854         if len(id) == 40:
   855             try:
   855             try:
   856                 # a full hex nodeid?
   856                 # a full hex nodeid?
   857                 node = bin(id)
   857                 node = bin(id)
   858                 r = self.rev(node)
   858                 self.rev(node)
   859                 return node
   859                 return node
   860             except (TypeError, LookupError):
   860             except (TypeError, LookupError):
   861                 pass
   861                 pass
   862 
   862 
   863     def _partialmatch(self, id):
   863     def _partialmatch(self, id):