##// END OF EJS Templates
copies: split the combination of the copies mapping in its own function...
marmoute -
r44225:421ea577 default
parent child Browse files
Show More
@@ -281,9 +281,24 b' def _changesetforwardcopies(a, b, match)'
281 iterrevs &= mrset
281 iterrevs &= mrset
282 iterrevs.update(roots)
282 iterrevs.update(roots)
283 iterrevs.remove(b.rev())
283 iterrevs.remove(b.rev())
284 revs = sorted(iterrevs)
285 return _combinechangesetcopies(revs, children, b.rev(), revinfo, match)
286
287
288 def _combinechangesetcopies(revs, children, targetrev, revinfo, match):
289 """combine the copies information for each item of iterrevs
290
291 revs: sorted iterable of revision to visit
292 children: a {parent: [children]} mapping.
293 targetrev: the final copies destination revision (not in iterrevs)
294 revinfo(rev): a function that return (p1, p2, p1copies, p2copies, removed)
295 match: a matcher
296
297 It returns the aggregated copies information for `targetrev`.
298 """
284 all_copies = {}
299 all_copies = {}
285 alwaysmatch = match.always()
300 alwaysmatch = match.always()
286 for r in sorted(iterrevs):
301 for r in revs:
287 copies = all_copies.pop(r, None)
302 copies = all_copies.pop(r, None)
288 if copies is None:
303 if copies is None:
289 # this is a root
304 # this is a root
@@ -336,7 +351,7 b' def _changesetforwardcopies(a, b, match)'
336 else:
351 else:
337 newcopies.update(othercopies)
352 newcopies.update(othercopies)
338 all_copies[c] = newcopies
353 all_copies[c] = newcopies
339 return all_copies[b.rev()]
354 return all_copies[targetrev]
340
355
341
356
342 def _forwardcopies(a, b, base=None, match=None):
357 def _forwardcopies(a, b, base=None, match=None):
General Comments 0
You need to be logged in to leave comments. Login now