[PATCH 2 of 4] push: move the list of obsmarker to push on the push operation

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Tue Aug 5 19:07:44 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1404580629 -7200
#      Sat Jul 05 19:17:09 2014 +0200
# Node ID be0fe1a58d79caaa4bf7c45296565e6816724c06
# Parent  ce55e0fa6279db4e80b8195308f3df64e6ba70ec
push: move the list of obsmarker to push on the push operation

The list is now carried on the push operation, this will lets extension override
it.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -79,10 +79,12 @@ class pushoperation(object):
         self.incoming = None
         # phases changes that must be pushed along side the changesets
         self.outdatedphases = None
         # phases changes that must be pushed if changeset push fails
         self.fallbackoutdatedphases = None
+        # outgoing obsmarkers
+        self.outobsmarkers = repo.obsstore
 
     @util.propertycache
     def futureheads(self):
         """future remote heads if the changeset push succeeds"""
         return self.outgoing.missingheads
@@ -588,11 +590,11 @@ def _pushobsolete(pushop):
     repo = pushop.repo
     remote = pushop.remote
     if (obsolete._enabled and repo.obsstore and
         'obsolete' in remote.listkeys('namespaces')):
         rslts = []
-        remotedata = obsolete._pushkeyescape(repo.obsstore)
+        remotedata = obsolete._pushkeyescape(pushop.outobsmarkers)
         for key in sorted(remotedata, reverse=True):
             # reverse sort to ensure we end with dump0
             data = remotedata[key]
             rslts.append(remote.pushkey('obsolete', key, '', data))
         if [r for r in rslts if not r]:


More information about the Mercurial-devel mailing list