From patchwork Mon Jul 7 11:02:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,9] push: add a ``pushop.stepsdone`` attribute From: Pierre-Yves David X-Patchwork-Id: 5119 Message-Id: <269b990354a93fd1837c.1404730922@marginatus.alto.octopoid.net> To: mercurial-devel@selenic.com Cc: pierre-yves.david@ens-lyon.org Date: Mon, 07 Jul 2014 13:02:02 +0200 # HG changeset patch # User Pierre-Yves David # Date 1404298134 -7200 # Wed Jul 02 12:48:54 2014 +0200 # Node ID 269b990354a93fd1837caebfd3708af646596024 # Parent 43db2776ef385be3ade68d49044adc2a39477510 push: add a ``pushop.stepsdone`` attribute This attribute will record what steps were performed during the bundle2 pushi. This will control whenever the old way push must be performed or skipped. This will ultimately be used by changegroup, phases, obsmarkers, bookmarks and any other kind of data ones may want to exchange even when bundle2 support is missing. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -59,10 +59,13 @@ class pushoperation(object): self.revs = revs # allow push of new branch self.newbranch = newbranch # did a local lock get acquired? self.locallocked = None + # step already performed + # (used to check what steps have been already performed through bundle2) + self.stepsdone = set() # Integer version of the push result # - None means nothing to push # - 0 means HTTP error # - 1 means we pushed and remote head count is unchanged *or* # we have outgoing changesets but refused to push