Skip to content
Snippets Groups Projects
Commit ada47c38f4e5 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

copies: don't detect copies as "divergent renames"

(For the purposes of this patch copy is defined as a rename where the
source continues to exist.)
parent 58a3e2608ae4
No related branches found
No related tags found
No related merge requests found
......@@ -195,8 +195,8 @@
diverge2 = set()
for of, fl in diverge.items():
if len(fl) == 1:
del diverge[of] # not actually divergent
if len(fl) == 1 or of in c2:
del diverge[of] # not actually divergent, or not a rename
else:
diverge2.update(fl) # reverse map for below
......
......@@ -75,3 +75,27 @@
$ hg debugrename b
b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
This used to trigger a "divergent renames" warning, despite no renames
$ hg cp b b3
$ hg cp b b4
$ hg ci -A -m 'copy b twice'
$ hg up eb92d88a9712
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg up
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg rm b3 b4
$ hg ci -m 'clean up a bit of our mess'
We'd rather not warn on divergent renames done in the same changeset (issue2113)
$ hg cp b b3
$ hg mv b b4
$ hg ci -A -m 'divergent renames in same changeset'
$ hg up c761c6948de0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg up
warning: detected divergent renames of b to:
b3
b4
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
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