changeset 22269:03cc81a28228

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 20 Aug 2014 17:36:54 -0700
parents ca2e9cf77033
children e5adb6935239
files mercurial/exchange.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):