mercurial/copies.py
changeset 16168 7bbabfe25321
parent 15994 3c2ce5c2cee0
child 16169 c12d4aceba79
equal deleted inserted replaced
16167:94a8396c9305 16168:7bbabfe25321
   174         return _backwardcopies(x, y)
   174         return _backwardcopies(x, y)
   175     return _chain(x, y, _backwardcopies(x, a), _forwardcopies(a, y))
   175     return _chain(x, y, _backwardcopies(x, a), _forwardcopies(a, y))
   176 
   176 
   177 def mergecopies(repo, c1, c2, ca, checkdirs=True):
   177 def mergecopies(repo, c1, c2, ca, checkdirs=True):
   178     """
   178     """
   179     Find moves and copies between context c1 and c2
   179     Find moves and copies between context c1 and c2 that are relevant
       
   180     for merging.
       
   181 
       
   182     Returns two dicts, "copy" and "diverge".
       
   183 
       
   184     "copy" is a mapping from source name -> destination name,
       
   185     where source is in c1 and destination is in c2 or vice-versa.
       
   186 
       
   187     "diverge" is a mapping of source name -> list of destination names
       
   188     for divergent renames.
   180     """
   189     """
   181     # avoid silly behavior for update from empty dir
   190     # avoid silly behavior for update from empty dir
   182     if not c1 or not c2 or c1 == c2:
   191     if not c1 or not c2 or c1 == c2:
   183         return {}, {}
   192         return {}, {}
   184 
   193