mercurial/revlogutils/nodemap.py
changeset 46469 835aafb2543f
parent 46468 83f037acf71a
child 46470 dadb4db55661
equal deleted inserted replaced
46468:83f037acf71a 46469:835aafb2543f
   632     """find the revision associated with a given node"""
   632     """find the revision associated with a given node"""
   633     entry = block.get(_to_int(node[0:1]))
   633     entry = block.get(_to_int(node[0:1]))
   634     if isinstance(entry, dict):
   634     if isinstance(entry, dict):
   635         return _find_node(entry, node[1:])
   635         return _find_node(entry, node[1:])
   636     return entry
   636     return entry
       
   637 
       
   638 
       
   639 def get_nodemap_file(opener, indexfile):
       
   640     if indexfile.endswith(b'.a'):
       
   641         pending_path = indexfile[:-4] + b".n.a"
       
   642         if opener.exists(pending_path):
       
   643             return pending_path
       
   644         else:
       
   645             return indexfile[:-4] + b".n"
       
   646     else:
       
   647         return indexfile[:-2] + b".n"