push: check if local and remote support evolution during discovery
We can now directly prevent any evolution-related operation from happening by using
an empty set for outgoing markers. So we detect if no transfers should occur and
use an empty set in this case.
--- a/mercurial/exchange.py Tue Aug 19 16:46:17 2014 -0700
+++ b/mercurial/exchange.py Wed Aug 20 17:36:54 2014 -0700
@@ -280,7 +280,10 @@
@pushdiscovery('obsmarker')
def _pushdiscoveryobsmarkers(pushop):
- pushop.outobsmarkers = pushop.repo.obsstore
+ if (obsolete._enabled
+ and pushop.repo.obsstore
+ and 'obsolete' in pushop.remote.listkeys('namespaces')):
+ pushop.outobsmarkers = pushop.repo.obsstore
@pushdiscovery('bookmarks')
def _pushdiscoverybookmarks(pushop):
@@ -652,8 +655,7 @@
repo = pushop.repo
remote = pushop.remote
pushop.stepsdone.add('obsmarkers')
- if (obsolete._enabled and repo.obsstore and
- 'obsolete' in remote.listkeys('namespaces')):
+ if (pushop.outobsmarkers):
rslts = []
remotedata = obsolete._pushkeyescape(pushop.outobsmarkers)
for key in sorted(remotedata, reverse=True):