mercurial/utils/storageutil.py
changeset 40003 ad8389ecd3f5
parent 40002 0e8836be9541
child 40004 fa3dc85a747e
equal deleted inserted replaced
40002:0e8836be9541 40003:ad8389ecd3f5
   119     for the store.
   119     for the store.
   120 
   120 
   121     Raises ``error.LookupError`` on failure.
   121     Raises ``error.LookupError`` on failure.
   122     """
   122     """
   123     if isinstance(fileid, int):
   123     if isinstance(fileid, int):
   124         return store.node(fileid)
   124         try:
       
   125             return store.node(fileid)
       
   126         except IndexError:
       
   127             raise error.LookupError(fileid, identifier, _('no match found'))
   125 
   128 
   126     if len(fileid) == 20:
   129     if len(fileid) == 20:
   127         try:
   130         try:
   128             store.rev(fileid)
   131             store.rev(fileid)
   129             return fileid
   132             return fileid