##// END OF EJS Templates
copies: make it possible to distinguish betwen _computenonoverlap invocations...
Pierre-Yves David -
r30196:d738cda7 default
parent child Browse files
Show More
@@ -231,23 +231,27 b' def pathcopies(x, y, match=None):'
231 return _chain(x, y, _backwardrenames(x, a),
231 return _chain(x, y, _backwardrenames(x, a),
232 _forwardcopies(a, y, match=match))
232 _forwardcopies(a, y, match=match))
233
233
234 def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2):
234 def _computenonoverlap(repo, c1, c2, addedinm1, addedinm2, baselabel=''):
235 """Computes, based on addedinm1 and addedinm2, the files exclusive to c1
235 """Computes, based on addedinm1 and addedinm2, the files exclusive to c1
236 and c2. This is its own function so extensions can easily wrap this call
236 and c2. This is its own function so extensions can easily wrap this call
237 to see what files mergecopies is about to process.
237 to see what files mergecopies is about to process.
238
238
239 Even though c1 and c2 are not used in this function, they are useful in
239 Even though c1 and c2 are not used in this function, they are useful in
240 other extensions for being able to read the file nodes of the changed files.
240 other extensions for being able to read the file nodes of the changed files.
241
242 "baselabel" can be passed to help distinguish the multiple computations
243 done in the graft case.
241 """
244 """
242 u1 = sorted(addedinm1 - addedinm2)
245 u1 = sorted(addedinm1 - addedinm2)
243 u2 = sorted(addedinm2 - addedinm1)
246 u2 = sorted(addedinm2 - addedinm1)
244
247
248 header = " unmatched files in %s"
249 if baselabel:
250 header += ' (from %s)' % baselabel
245 if u1:
251 if u1:
246 repo.ui.debug(" unmatched files in local:\n %s\n"
252 repo.ui.debug("%s:\n %s\n" % (header % 'local', "\n ".join(u1)))
247 % "\n ".join(u1))
248 if u2:
253 if u2:
249 repo.ui.debug(" unmatched files in other:\n %s\n"
254 repo.ui.debug("%s:\n %s\n" % (header % 'other', "\n ".join(u2)))
250 % "\n ".join(u2))
251 return u1, u2
255 return u1, u2
252
256
253 def _makegetfctx(ctx):
257 def _makegetfctx(ctx):
General Comments 0
You need to be logged in to leave comments. Login now