##// END OF EJS Templates
copy: move mergecopies file logic to a function...
Durham Goode -
r24010:a63c2b15 default
parent child Browse files
Show More
@@ -208,6 +208,22 b' def pathcopies(x, y):'
208 return _backwardrenames(x, y)
208 return _backwardrenames(x, y)
209 return _chain(x, y, _backwardrenames(x, a), _forwardcopies(a, y))
209 return _chain(x, y, _backwardrenames(x, a), _forwardcopies(a, y))
210
210
211 def _computenonoverlap(repo, m1, m2, ma):
212 """Computes the files exclusive to m1 and m2.
213 This is its own function so extensions can easily wrap this call to see what
214 files mergecopies is about to process.
215 """
216 u1 = _nonoverlap(m1, m2, ma)
217 u2 = _nonoverlap(m2, m1, ma)
218
219 if u1:
220 repo.ui.debug(" unmatched files in local:\n %s\n"
221 % "\n ".join(u1))
222 if u2:
223 repo.ui.debug(" unmatched files in other:\n %s\n"
224 % "\n ".join(u2))
225 return u1, u2
226
211 def mergecopies(repo, c1, c2, ca):
227 def mergecopies(repo, c1, c2, ca):
212 """
228 """
213 Find moves and copies between context c1 and c2 that are relevant
229 Find moves and copies between context c1 and c2 that are relevant
@@ -261,15 +277,7 b' def mergecopies(repo, c1, c2, ca):'
261
277
262 repo.ui.debug(" searching for copies back to rev %d\n" % limit)
278 repo.ui.debug(" searching for copies back to rev %d\n" % limit)
263
279
264 u1 = _nonoverlap(m1, m2, ma)
280 u1, u2 = _computenonoverlap(repo, m1, m2, ma)
265 u2 = _nonoverlap(m2, m1, ma)
266
267 if u1:
268 repo.ui.debug(" unmatched files in local:\n %s\n"
269 % "\n ".join(u1))
270 if u2:
271 repo.ui.debug(" unmatched files in other:\n %s\n"
272 % "\n ".join(u2))
273
281
274 for f in u1:
282 for f in u1:
275 checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy)
283 checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy)
General Comments 0
You need to be logged in to leave comments. Login now