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