mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
copies: eliminate criss-crosses when chaining
Before the copies refactoring, we declared that if a and b were present in source and destination, we ignored copies between them. The refactored code could however report b was a copy of a and vice versa in a situation where we looked for differences between two identical changesets that copy a to b. y / x \ y'
This commit is contained in:
parent
b7b4c9e86d
commit
4b04e60eef
@ -99,6 +99,13 @@ def _chain(src, dst, a, b):
|
||||
if v in src:
|
||||
# file is a copy of an existing file
|
||||
t[k] = v
|
||||
|
||||
# remove criss-crossed copies
|
||||
for k, v in t.items():
|
||||
if k in src and v in dst:
|
||||
print "bad", k, v
|
||||
del t[k]
|
||||
|
||||
return t
|
||||
|
||||
def _tracefile(fctx, actx):
|
||||
|
Loading…
Reference in New Issue
Block a user