Mercurial > public > mercurial-scm > hg
diff mercurial/exchange.py @ 22069:616a455b02ca
phase: add a transaction argument to advanceboundary
We now pass a transaction option to this phase movement function. The object
is currently not used by the function, but it will be in the future.
All call sites have been updated. Most call sites were already enclosed in a
transaction for a long time. The handful of others have been recently
updated in previous commit.
The retractboundary function remains to be upgraded.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 06 Aug 2014 01:54:19 -0700 |
parents | d34058dd3246 |
children | f713de1d3916 |
line wrap: on
line diff
--- a/mercurial/exchange.py Wed Aug 06 00:54:37 2014 -0700 +++ b/mercurial/exchange.py Wed Aug 06 01:54:19 2014 -0700 @@ -577,7 +577,7 @@ if pushop.locallocked: tr = pushop.repo.transaction('push-phase-sync') try: - phases.advanceboundary(pushop.repo, phase, nodes) + phases.advanceboundary(pushop.repo, tr, phase, nodes) tr.close() finally: tr.release() @@ -840,12 +840,14 @@ # exclude changesets already public locally and update the others pheads = [pn for pn in pheads if phase(unfi, rev(pn)) > public] if pheads: - phases.advanceboundary(pullop.repo, public, pheads) + tr = pullop.gettransaction() + phases.advanceboundary(pullop.repo, tr, public, pheads) # exclude changesets already draft locally and update the others dheads = [pn for pn in dheads if phase(unfi, rev(pn)) > draft] if dheads: - phases.advanceboundary(pullop.repo, draft, dheads) + tr = pullop.gettransaction() + phases.advanceboundary(pullop.repo, tr, draft, dheads) def _pullobsolete(pullop): """utility function to pull obsolete markers from a remote