mercurial/context.py
changeset 16601 0c98820be15c
parent 16599 4b73f4ba27ca
child 16602 80aef0bc5ba7
equal deleted inserted replaced
16600:b54f3c502e63 16601:0c98820be15c
   643         """
   643         """
   644 
   644 
   645         # the easy case: no (relevant) renames
   645         # the easy case: no (relevant) renames
   646         if fc2.path() == self.path() and self.path() in actx:
   646         if fc2.path() == self.path() and self.path() in actx:
   647             return actx[self.path()]
   647             return actx[self.path()]
       
   648 
       
   649         # the next easiest cases: unambiguous predecessor (name trumps
       
   650         # history)
       
   651         if self.path() in actx and fc2.path() not in actx:
       
   652             return actx[self.path()]
       
   653         if fc2.path() in actx and self.path() not in actx:
       
   654             return actx[fc2.path()]
       
   655 
       
   656         # prime the ancestor cache for the working directory
   648         acache = {}
   657         acache = {}
   649 
       
   650         # prime the ancestor cache for the working directory
       
   651         for c in (self, fc2):
   658         for c in (self, fc2):
   652             if c._filerev is None:
   659             if c._filerev is None:
   653                 pl = [(n.path(), n.filenode()) for n in c.parents()]
   660                 pl = [(n.path(), n.filenode()) for n in c.parents()]
   654                 acache[(c._path, None)] = pl
   661                 acache[(c._path, None)] = pl
   655 
   662