mercurial/exchange.py
changeset 22269 03cc81a28228
parent 22244 172036d60b22
child 22341 2d16b39601b5
--- 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):