mercurial/copies.py
changeset 42118 967c098eed33
parent 42115 27475ae67676
child 42142 5382d8f8530b
equal deleted inserted replaced
42117:b287ed6eb9df 42118:967c098eed33
   428             remainder[f] = ic
   428             remainder[f] = ic
   429     return remainder
   429     return remainder
   430 
   430 
   431 def mergecopies(repo, c1, c2, base):
   431 def mergecopies(repo, c1, c2, base):
   432     """
   432     """
   433     The function calling different copytracing algorithms on the basis of config
   433     Finds moves and copies between context c1 and c2 that are relevant for
   434     which find moves and copies between context c1 and c2 that are relevant for
       
   435     merging. 'base' will be used as the merge base.
   434     merging. 'base' will be used as the merge base.
   436 
   435 
   437     Copytracing is used in commands like rebase, merge, unshelve, etc to merge
   436     Copytracing is used in commands like rebase, merge, unshelve, etc to merge
   438     files that were moved/ copied in one merge parent and modified in another.
   437     files that were moved/ copied in one merge parent and modified in another.
   439     For example:
   438     For example:
   470     names for files deleted in c1 that were renamed in c2 or vice-versa.
   469     names for files deleted in c1 that were renamed in c2 or vice-versa.
   471 
   470 
   472     "dirmove" is a mapping of detected source dir -> destination dir renames.
   471     "dirmove" is a mapping of detected source dir -> destination dir renames.
   473     This is needed for handling changes to new files previously grafted into
   472     This is needed for handling changes to new files previously grafted into
   474     renamed directories.
   473     renamed directories.
       
   474 
       
   475     This function calls different copytracing algorithms based on config.
   475     """
   476     """
   476     # avoid silly behavior for update from empty dir
   477     # avoid silly behavior for update from empty dir
   477     if not c1 or not c2 or c1 == c2:
   478     if not c1 or not c2 or c1 == c2:
   478         return {}, {}, {}, {}, {}
   479         return {}, {}, {}, {}, {}
   479 
   480