sinmple4server: advertise new cap only when advertising obsolescence
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 12 Mar 2014 13:03:35 -0700
changeset 884 4ae115cf3efd
parent 883 d2fa1061df16
child 885 6cb81dbb9516
sinmple4server: advertise new cap only when advertising obsolescence This is more consistent.
hgext/simple4server.py
--- a/hgext/simple4server.py	Wed Mar 12 13:01:32 2014 -0700
+++ b/hgext/simple4server.py	Wed Mar 12 13:03:35 2014 -0700
@@ -222,7 +222,8 @@
 def capabilities(orig, repo, proto):
     """wrapper to advertise new capability"""
     caps = orig(repo, proto)
-    if obsolete._enabled:
+    advertise = repo.ui.configbool('__temporary__', 'advertiseobsolete', True)
+    if obsolete._enabled and advertise:
         caps += ' _evoext_pushobsmarkers_0'
         caps += ' _evoext_pullobsmarkers_0'
         caps += ' _evoext_obshash_0'