# HG changeset patch # User Durham Goode # Date 1426812141 25200 # Node ID 196c650d5ba9ce8726806198c331f5fa040bfe94 # Parent a307eea46f96bb92c62ee58d25f00b681e27589b pushexperiment: remove use of obsolete._enabled pushexperiment.py was using obsolete._enabled but it didn't cause any tests to fail so I didn't see it. Let's go ahead and replace it with the new obsolete.isenabled() api. diff -r a307eea46f96 -r 196c650d5ba9 hgext/pushexperiment.py --- a/hgext/pushexperiment.py Thu Mar 19 13:42:27 2015 -0700 +++ b/hgext/pushexperiment.py Thu Mar 19 17:42:21 2015 -0700 @@ -49,7 +49,8 @@ def syncpush(orig, repo, remote): """wraper for obsolete.syncpush to use the fast way if possible""" - if not (obsolete._enabled and repo.obsstore): + if not (obsolete.isenabled(repo, obsolete.exchangeopt) and + repo.obsstore): return if remote.capable('_push_experiment_pushobsmarkers_0'): return # already pushed before changeset @@ -75,7 +76,7 @@ """push wrapped that call the wire protocol command""" if not remote.canpush(): raise util.Abort(_("destination does not support push")) - if (obsolete._enabled and repo.obsstore + if (obsolete.isenabled(repo, obsolete.exchangeopt) and repo.obsstore and remote.capable('_push_experiment_pushobsmarkers_0')): # push marker early to limit damage of pushing too early. try: @@ -94,7 +95,7 @@ def capabilities(orig, repo, proto): """wrapper to advertise new capability""" caps = orig(repo, proto) - if obsolete._enabled: + if obsolete.isenabled(repo, obsolete.exchangeopt): caps += ' _push_experiment_pushobsmarkers_0' caps += ' _push_experiment_notifypushend_0' return caps