changeset 22035:24bb01f42e82

push: introduce a discovery step for obsmarker The discovery step is still not doing anything smart. But this will allow extension to wrap it.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 05 Jul 2014 19:32:20 +0200
parents 5f57bc77657c
children f1528ef123f4
files mercurial/exchange.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Sat Jul 05 19:17:09 2014 +0200
+++ b/mercurial/exchange.py	Sat Jul 05 19:32:20 2014 +0200
@@ -82,7 +82,7 @@
         # phases changes that must be pushed if changeset push fails
         self.fallbackoutdatedphases = None
         # outgoing obsmarkers
-        self.outobsmarkers = repo.obsstore
+        self.outobsmarkers = set()
 
     @util.propertycache
     def futureheads(self):
@@ -278,6 +278,10 @@
     pushop.outdatedphases = future
     pushop.fallbackoutdatedphases = fallback
 
+@pushdiscovery('obsmarker')
+def _pushdiscoveryobsmarkers(pushop):
+    pushop.outobsmarkers = pushop.repo.obsstore
+
 def _pushcheckoutgoing(pushop):
     outgoing = pushop.outgoing
     unfi = pushop.repo.unfiltered()