##// END OF EJS Templates
phases: rework phase movement code in 'cg.apply' to use 'registernew'...
Boris Feld -
r33456:ae052d04 default
parent child Browse files
Show More
@@ -356,6 +356,7 b' class cg1unpacker(object):'
356 356 repo.hook('pretxnchangegroup', throw=True, **hookargs)
357 357
358 358 added = [cl.node(r) for r in xrange(clstart, clend)]
359 phaseall = None
359 360 if srctype in ('push', 'serve'):
360 361 # Old servers can not push the boundary themselves.
361 362 # New servers won't push the boundary if changeset already
@@ -364,16 +365,19 b' class cg1unpacker(object):'
364 365 # We should not use added here but the list of all change in
365 366 # the bundle
366 367 if repo.publishing():
367 phases.advanceboundary(repo, tr, phases.public, cgnodes)
368 targetphase = phaseall = phases.public
368 369 else:
370 # closer target phase computation
371
369 372 # Those changesets have been pushed from the
370 373 # outside, their phases are going to be pushed
371 374 # alongside. Therefor `targetphase` is
372 375 # ignored.
373 phases.advanceboundary(repo, tr, phases.draft, cgnodes)
374 phases.retractboundary(repo, tr, phases.draft, added)
375 else:
376 phases.retractboundary(repo, tr, targetphase, added)
376 targetphase = phaseall = phases.draft
377 if added:
378 phases.registernew(repo, tr, targetphase, added)
379 if phaseall is not None:
380 phases.advanceboundary(repo, tr, phaseall, cgnodes)
377 381
378 382 if changesets > 0:
379 383
General Comments 0
You need to be logged in to leave comments. Login now