# HG changeset patch # User Martin von Zweigbergk # Date 1555571105 25200 # Node ID df7ad90edbd4c31e744619a00fb5a95a7b558970 # Parent d1c2688eda80211b2430d62b98853931ac293f45 copies: delete a redundant cleanup step in _chain() The check is redundant since d5edb5d3a337 (copies: filter out copies when target is not in destination manifest, 2019-02-14). To test that hypothesis, I made this change in the commit that commit, but all tests still passed. I think the case was necessary before then, we just didn't have tests for it. Differential Revision: https://phab.mercurial-scm.org/D6275 diff -r d1c2688eda80 -r df7ad90edbd4 mercurial/copies.py --- a/mercurial/copies.py Wed Apr 17 23:10:14 2019 -0700 +++ b/mercurial/copies.py Thu Apr 18 00:05:05 2019 -0700 @@ -134,10 +134,6 @@ if t[v] != k: # file wasn't renamed back to itself (i.e. case 4, not 3) t[k] = t[v] - if v not in dst: - # chain was a rename, not a copy - # this deletes the copy for 'y' in case 4 - del t[v] if v in src: # file is a copy of an existing file, i.e. case 6. t[k] = v