##// END OF EJS Templates
phases: extract the intermediate set of affected revs...
Boris Feld -
r33450:d017f1d3 default
parent child Browse files
Show More
@@ -283,6 +283,10 b' class phasecache(object):'
283 tr.hookargs['phases_moved'] = '1'
283 tr.hookargs['phases_moved'] = '1'
284
284
285 def advanceboundary(self, repo, tr, targetphase, nodes):
285 def advanceboundary(self, repo, tr, targetphase, nodes):
286 """Set all 'nodes' to phase 'targetphase'
287
288 Nodes with a phase lower than 'targetphase' are not affected.
289 """
286 # Be careful to preserve shallow-copied values: do not update
290 # Be careful to preserve shallow-copied values: do not update
287 # phaseroots values, replace them.
291 # phaseroots values, replace them.
288
292
@@ -294,9 +298,12 b' class phasecache(object):'
294 if self.phase(repo, repo[n].rev()) >= phase]
298 if self.phase(repo, repo[n].rev()) >= phase]
295 if not nodes:
299 if not nodes:
296 break # no roots to move anymore
300 break # no roots to move anymore
301
297 olds = self.phaseroots[phase]
302 olds = self.phaseroots[phase]
303 affected = repo.revs('%ln::%ln', olds, nodes)
304
298 roots = set(ctx.node() for ctx in repo.set(
305 roots = set(ctx.node() for ctx in repo.set(
299 'roots((%ln::) - (%ln::%ln))', olds, olds, nodes))
306 'roots((%ln::) - %ld)', olds, affected))
300 if olds != roots:
307 if olds != roots:
301 self._updateroots(phase, roots, tr)
308 self._updateroots(phase, roots, tr)
302 # some roots may need to be declared for lower phases
309 # some roots may need to be declared for lower phases
General Comments 0
You need to be logged in to leave comments. Login now