# HG changeset patch # User Pierre-Yves David # Date 1489110650 28800 # Node ID a7c0685ba6d93a52e073903fecf11f64cae2c352 # Parent 081d54b3e7f01219016d65b31aa14cd067b0cda6 evolution: drop the old __temporary__.advertiseobsolete option Mercurial code supports such feature directly though its 'experimental.evolution' config option. So we drop the old code and config. diff --git a/README b/README --- a/README +++ b/README @@ -89,7 +89,8 @@ only the part related to exchange and is intended to be used by server. Using the extension will enable evolution, use 'experimental.evolution=!' - to disable obsmarkers echange. + to disable obsmarkers echange. The old '__temporary__.advertiseobsolete' + option is no longer supported. 5.6.1 -- 2017-02-28 diff --git a/hgext3rd/evolve/obsdiscovery.py b/hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py +++ b/hgext3rd/evolve/obsdiscovery.py @@ -271,8 +271,7 @@ def _obshash_capabilities(orig, repo, proto): """wrapper to advertise new capability""" caps = orig(repo, proto) - advertise = repo.ui.configbool('__temporary__', 'advertiseobsolete', True) - if obsolete.isenabled(repo, obsolete.exchangeopt) and advertise: + if obsolete.isenabled(repo, obsolete.exchangeopt): caps = caps.split() caps.append('_evoext_obshash_0') caps.append('_evoext_obshash_1') diff --git a/hgext3rd/evolve/obsexchange.py b/hgext3rd/evolve/obsexchange.py --- a/hgext3rd/evolve/obsexchange.py +++ b/hgext3rd/evolve/obsexchange.py @@ -47,23 +47,6 @@ _bestformat = max(obsolete.formats.keys()) -################################## -### Control evolve advertising ### -################################## - -# This is useful to not enable evolution on all repositories on an install - -def _nslist(orig, repo): - rep = orig(repo) - if not repo.ui.configbool('__temporary__', 'advertiseobsolete', True): - rep.pop('obsolete') - return rep - -@eh.extsetup -def extsetup_advertise(ui): - extensions.wrapfunction(pushkey, '_nslist', _nslist) - pushkey._namespaces['namespaces'] = (lambda *x: False, pushkey._nslist) - ##################################################### ### Support for subset specification in getbundle ### ##################################################### @@ -106,8 +89,7 @@ def _obscommon_capabilities(orig, repo, proto): """wrapper to advertise new capability""" caps = orig(repo, proto) - advertise = repo.ui.configbool('__temporary__', 'advertiseobsolete', True) - if obsolete.isenabled(repo, obsolete.exchangeopt) and advertise: + if obsolete.isenabled(repo, obsolete.exchangeopt): caps = caps.split() caps.append('_evoext_getbundle_obscommon') caps.sort() @@ -423,8 +405,7 @@ def _legacypush_capabilities(orig, repo, proto): """wrapper to advertise new capability""" caps = orig(repo, proto) - advertise = repo.ui.configbool('__temporary__', 'advertiseobsolete', True) - if obsolete.isenabled(repo, obsolete.exchangeopt) and advertise: + if obsolete.isenabled(repo, obsolete.exchangeopt): caps = caps.split() caps.append('_evoext_pushobsmarkers_0') caps.append('_evoext_pullobsmarkers_0')