Submitter | phabricator |
---|---|
Date | Feb. 21, 2019, 2:35 a.m. |
Message ID | <5bf3afe54e4871d44a6ef52f09de31fd@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/38849/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/tests/test-copies.t b/tests/test-copies.t --- a/tests/test-copies.t +++ b/tests/test-copies.t @@ -194,9 +194,7 @@ |/ x y o 0 add x x -BROKEN: x doesn't exist here $ hg debugpathcopies 1 2 - y -> x Copies via null revision (there shouldn't be any) $ newrepo diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -124,10 +124,13 @@ # file is a copy of an existing file t[k] = v - # remove criss-crossed copies for k, v in list(t.items()): + # remove criss-crossed copies if k in src and v in dst: del t[k] + # remove copies to files that were then removed + elif k not in dst: + del t[k] return t