# HG changeset patch # User Pierre-Yves David # Date 2014-01-31 07:16:43 # Node ID ef880ced6d07f0ec9009efef7fb403ed1263de8d # Parent 233623d58c9acf74132b04fedf881152b4e07343 push: move `commonheads` into the push object The phase synchronisation start by computing the new set of common head between local and remote and then do the phase synchronisation on this set. This new common set logic will eventually be used by the obsolescence markers exchange. So we are going to split the long phase synchronisation in two. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -48,6 +48,8 @@ class pushoperation(object): self.remoteheads = None # testable as a boolean indicating if any nodes are missing locally. self.incoming = None + # set of all heads common after changeset bundle push + self.commonheads = None def push(repo, remote, force=False, revs=None, newbranch=False): '''Push outgoing changesets (limited by revs) from a local @@ -238,6 +240,7 @@ def _pushsyncphase(pushop): pushop.outgoing.commonheads, pushop.outgoing.missing) cheads.extend(c.node() for c in revset) + pushop.commonheads = cheads # even when we don't push, exchanging phase data is useful remotephases = pushop.remote.listkeys('phases') if (pushop.ui.configbool('ui', '_usedassubrepo', False)