##// END OF EJS Templates
merge with main
Thomas Arendsen Hein -
r4893:44b00315 merge default
parent child Browse files
Show More
@@ -184,7 +184,7 class filectx(object):
184 184 def __eq__(self, other):
185 185 try:
186 186 return (self._path == other._path
187 and self._changeid == other._changeid)
187 and self._fileid == other._fileid)
188 188 except AttributeError:
189 189 return False
190 190
@@ -157,7 +157,7 def findcopies(repo, m1, m2, ma, limit):
157 157 fullcopy = {}
158 158 diverge = {}
159 159
160 def checkcopies(c, man):
160 def checkcopies(c, man, aman):
161 161 '''check possible copies for filectx c'''
162 162 for of in findold(c):
163 163 fullcopy[c.path()] = of # remember for dir rename detection
@@ -165,6 +165,10 def findcopies(repo, m1, m2, ma, limit):
165 165 if of in ma:
166 166 diverge.setdefault(of, []).append(c.path())
167 167 continue
168 # if the original file is unchanged on the other branch,
169 # no merge needed
170 if man[of] == aman.get(of):
171 continue
168 172 c2 = ctx(of, man[of])
169 173 ca = c.ancestor(c2)
170 174 if not ca: # unrelated?
@@ -186,10 +190,10 def findcopies(repo, m1, m2, ma, limit):
186 190 u2 = nonoverlap(m2, m1, ma)
187 191
188 192 for f in u1:
189 checkcopies(ctx(f, m1[f]), m2)
193 checkcopies(ctx(f, m1[f]), m2, ma)
190 194
191 195 for f in u2:
192 checkcopies(ctx(f, m2[f]), m1)
196 checkcopies(ctx(f, m2[f]), m1, ma)
193 197
194 198 d2 = {}
195 199 for of, fl in diverge.items():
@@ -197,7 +201,6 def findcopies(repo, m1, m2, ma, limit):
197 201 fo = list(fl)
198 202 fo.remove(f)
199 203 d2[f] = (of, fo)
200 #diverge = d2
201 204
202 205 if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
203 206 return copy, diverge
General Comments 0
You need to be logged in to leave comments. Login now