mercurial/copies.py
changeset 46399 1d6d1a15a963
parent 46398 154ded9104f1
child 46408 e948ad0dcbe2
equal deleted inserted replaced
46398:154ded9104f1 46399:1d6d1a15a963
    57     # cannot tell the difference between cases 1 and 2, between 3 and 4, or
    57     # cannot tell the difference between cases 1 and 2, between 3 and 4, or
    58     # between 5 and 6, so it includes all cases in its result.
    58     # between 5 and 6, so it includes all cases in its result.
    59     # Cases 1, 3, and 5 are then removed by _filter().
    59     # Cases 1, 3, and 5 are then removed by _filter().
    60 
    60 
    61     for k, v in list(t.items()):
    61     for k, v in list(t.items()):
    62         # remove copies from files that didn't exist
    62         if k == v:  # case 3
    63         if v not in src:  # case 5
       
    64             del t[k]
    63             del t[k]
    65         # remove criss-crossed copies
    64         elif v not in src:  # case 5
    66         elif k in src and v in dst:
    65             # remove copies from files that didn't exist
    67             del t[k]
    66             del t[k]
    68         # remove copies to files that were then removed
       
    69         elif k not in dst:  # case 1
    67         elif k not in dst:  # case 1
       
    68             # remove copies to files that were then removed
    70             del t[k]
    69             del t[k]
    71 
    70 
    72 
    71 
    73 def _chain(prefix, suffix):
    72 def _chain(prefix, suffix):
    74     """chain two sets of copies 'prefix' and 'suffix'"""
    73     """chain two sets of copies 'prefix' and 'suffix'"""