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

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 6, 2014, 12:07 a.m.
Message ID <be0fe1a58d79caaa4bf7.1407283664@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5279/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 6, 2014, 12:07 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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]: