[PATCH 3 of 4] push: introduce a discovery step for obsmarker
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Tue Aug 5 19:07:45 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1404581540 -7200
# Sat Jul 05 19:32:20 2014 +0200
# Node ID f4a03fda065a5d97a7660af7de85bd63534c47cf
# Parent be0fe1a58d79caaa4bf7c45296565e6816724c06
push: introduce a discovery step for obsmarker
The discovery steps is still not doing anything smart. But this will allow
extension to wrap it.
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -80,11 +80,11 @@ class pushoperation(object):
# 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
+ self.outobsmarkers = set()
@util.propertycache
def futureheads(self):
"""future remote heads if the changeset push succeeds"""
return self.outgoing.missingheads
@@ -276,10 +276,14 @@ def _pushdiscoveryphase(pushop):
fdroots = [f.node() for f in fdroots]
future = list(unfi.set(revset, fdroots, pushop.futureheads))
pushop.outdatedphases = future
pushop.fallbackoutdatedphases = fallback
+ at pushdiscovery('obsmarker')
+def _pushdiscoveryobsmarkers(pushop):
+ pushop.outobsmarkers = pushop.repo.obsstore
+
def _pushcheckoutgoing(pushop):
outgoing = pushop.outgoing
unfi = pushop.repo.unfiltered()
if not outgoing.missing:
# nothing to push
More information about the Mercurial-devel
mailing list