changeset 2055:ce3d68029ed7

compat: drop special code handling change in push/pull op API All version of Mercurial we support have the same API.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 07 Mar 2017 14:41:53 +0100
parents f9d65d24b9f9
children b96ca1b51e04
files hgext3rd/evolve/obsexchange.py
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsexchange.py	Tue Mar 07 14:29:43 2017 +0100
+++ b/hgext3rd/evolve/obsexchange.py	Tue Mar 07 14:41:53 2017 +0100
@@ -63,11 +63,9 @@
 @eh.wrapfunction(exchange, '_pushobsolete')
 def _pushobsolete(orig, pushop):
     """utility function to push obsolete markers to a remote"""
-    stepsdone = getattr(pushop, 'stepsdone', None)
-    if stepsdone is not None:
-        if 'obsmarkers' in stepsdone:
-            return
-        stepsdone.add('obsmarkers')
+    if 'obsmarkers' in pushop.stepsdone:
+        return
+    pushop.stepsdone.add('obsmarkers')
     if pushop.cgresult == 0:
         return
     pushop.ui.debug('try to push obsolete markers to remote\n')
@@ -173,9 +171,7 @@
 def _pullobsolete(orig, pullop):
     if not obsolete.isenabled(pullop.repo, obsolete.exchangeopt):
         return None
-    if 'obsmarkers' not in getattr(pullop, 'todosteps', ['obsmarkers']):
-        return None
-    if 'obsmarkers' in getattr(pullop, 'stepsdone', []):
+    if 'obsmarkers' in pullop.stepsdone:
         return None
     wirepull = pullop.remote.capable('_evoext_pullobsmarkers_0')
     if not wirepull: