Show More
@@ -123,23 +123,18 b' def findcopies(repo, m1, m2, ma, limit):' | |||||
123 | c1 = ctx(f, m1[f]) |
|
123 | c1 = ctx(f, m1[f]) | |
124 | for of in _findoldnames(c1, limit): |
|
124 | for of in _findoldnames(c1, limit): | |
125 | fullcopy[f] = of # remember for dir rename detection |
|
125 | fullcopy[f] = of # remember for dir rename detection | |
126 |
if of |
|
126 | if of in m2: # original file not in other manifest? | |
127 | if of in ma: |
|
127 | # if the original file is unchanged on the other branch, | |
128 | diverge.setdefault(of, []).append(f) |
|
128 | # no merge needed | |
129 | continue |
|
129 | if m2[of] != ma.get(of): | |
130 | # if the original file is unchanged on the other branch, |
|
130 | c2 = ctx(of, m2[of]) | |
131 | # no merge needed |
|
131 | ca = c1.ancestor(c2) | |
132 | if m2[of] == ma.get(of): |
|
132 | # related and named changed on only one side? | |
133 | continue |
|
133 | if ca and ca.path() == f or ca.path() == c2.path(): | |
134 | c2 = ctx(of, m2[of]) |
|
134 | if c1 != ca or c2 != ca: # merge needed? | |
135 | ca = c1.ancestor(c2) |
|
135 | copy[f] = of | |
136 |
if |
|
136 | elif of in ma: | |
137 | continue |
|
137 | diverge.setdefault(of, []).append(f) | |
138 | # named changed on only one side? |
|
|||
139 | if ca.path() == f or ca.path() == c2.path(): |
|
|||
140 | if c1 == ca and c2 == ca: # no merge needed, ignore copy |
|
|||
141 | continue |
|
|||
142 | copy[f] = of |
|
|||
143 |
|
138 | |||
144 | if not repo.ui.configbool("merge", "followcopies", True): |
|
139 | if not repo.ui.configbool("merge", "followcopies", True): | |
145 | return {}, {} |
|
140 | return {}, {} |
General Comments 0
You need to be logged in to leave comments.
Login now