##// END OF EJS Templates
changegroup: add a `targetphase` argument to `addchangegroup`...
Pierre-Yves David -
r22041:97f86ce7 default
parent child Browse files
Show More
@@ -569,7 +569,8 b' def addchangegroupfiles(repo, source, re'
569
569
570 return revisions, files
570 return revisions, files
571
571
572 def addchangegroup(repo, source, srctype, url, emptyok=False):
572 def addchangegroup(repo, source, srctype, url, emptyok=False,
573 targetphase=phases.draft):
573 """Add the changegroup returned by source.read() to this repo.
574 """Add the changegroup returned by source.read() to this repo.
574 srctype is a string like 'push', 'pull', or 'unbundle'. url is
575 srctype is a string like 'push', 'pull', or 'unbundle'. url is
575 the URL of the repo where this changegroup is coming from.
576 the URL of the repo where this changegroup is coming from.
@@ -701,13 +702,16 b' def addchangegroup(repo, source, srctype'
701 if publishing:
702 if publishing:
702 phases.advanceboundary(repo, phases.public, srccontent)
703 phases.advanceboundary(repo, phases.public, srccontent)
703 else:
704 else:
705 # Those changesets have been pushed from the outside, their
706 # phases are going to be pushed alongside. Therefor
707 # `targetphase` is ignored.
704 phases.advanceboundary(repo, phases.draft, srccontent)
708 phases.advanceboundary(repo, phases.draft, srccontent)
705 phases.retractboundary(repo, phases.draft, added)
709 phases.retractboundary(repo, phases.draft, added)
706 elif srctype != 'strip':
710 elif srctype != 'strip':
707 # publishing only alter behavior during push
711 # publishing only alter behavior during push
708 #
712 #
709 # strip should not touch boundary at all
713 # strip should not touch boundary at all
710 phases.retractboundary(repo, phases.draft, added)
714 phases.retractboundary(repo, targetphase, added)
711
715
712 # make changelog see real files again
716 # make changelog see real files again
713 cl.finalize(trp)
717 cl.finalize(trp)
General Comments 0
You need to be logged in to leave comments. Login now