Show More
@@ -195,8 +195,8 b' def copies(repo, c1, c2, ca, checkdirs=F' | |||||
195 |
|
195 | |||
196 | diverge2 = set() |
|
196 | diverge2 = set() | |
197 | for of, fl in diverge.items(): |
|
197 | for of, fl in diverge.items(): | |
198 | if len(fl) == 1: |
|
198 | if len(fl) == 1 or of in c2: | |
199 | del diverge[of] # not actually divergent |
|
199 | del diverge[of] # not actually divergent, or not a rename | |
200 | else: |
|
200 | else: | |
201 | diverge2.update(fl) # reverse map for below |
|
201 | diverge2.update(fl) # reverse map for below | |
202 |
|
202 |
@@ -75,3 +75,27 b'' | |||||
75 | $ hg debugrename b |
|
75 | $ hg debugrename b | |
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 |
|
76 | b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66 | |
77 |
|
77 | |||
|
78 | This used to trigger a "divergent renames" warning, despite no renames | |||
|
79 | ||||
|
80 | $ hg cp b b3 | |||
|
81 | $ hg cp b b4 | |||
|
82 | $ hg ci -A -m 'copy b twice' | |||
|
83 | $ hg up eb92d88a9712 | |||
|
84 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
85 | $ hg up | |||
|
86 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
87 | $ hg rm b3 b4 | |||
|
88 | $ hg ci -m 'clean up a bit of our mess' | |||
|
89 | ||||
|
90 | We'd rather not warn on divergent renames done in the same changeset (issue2113) | |||
|
91 | ||||
|
92 | $ hg cp b b3 | |||
|
93 | $ hg mv b b4 | |||
|
94 | $ hg ci -A -m 'divergent renames in same changeset' | |||
|
95 | $ hg up c761c6948de0 | |||
|
96 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
97 | $ hg up | |||
|
98 | warning: detected divergent renames of b to: | |||
|
99 | b3 | |||
|
100 | b4 | |||
|
101 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now