Skip to content
Snippets Groups Projects
Commit d5edb5d3 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

copies: filter out copies when target is not in destination manifest

When chaining a series of commits that copied a file with a series
that removed the destination file, we would still include the copy in
the result. Similar to the previous patch, I have checked that `hg
status --copies` is not affected by this bug, but I wouldn't be
surprised if some commands are.

Differential Revision: https://phab.mercurial-scm.org/D5989
parent 3158cb74
No related branches found
No related tags found
No related merge requests found
......@@ -124,5 +124,4 @@
# file is a copy of an existing file
t[k] = v
# remove criss-crossed copies
for k, v in list(t.items()):
......@@ -128,3 +127,4 @@
for k, v in list(t.items()):
# remove criss-crossed copies
if k in src and v in dst:
del t[k]
......@@ -129,5 +129,8 @@
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
......
......@@ -194,5 +194,4 @@
|/ x y
o 0 add x
x
BROKEN: x doesn't exist here
$ hg debugpathcopies 1 2
......@@ -198,5 +197,4 @@
$ hg debugpathcopies 1 2
y -> x
Copies via null revision (there shouldn't be any)
$ newrepo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment