changeset 884:4ae115cf3efd

sinmple4server: advertise new cap only when advertising obsolescence This is more consistent.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 12 Mar 2014 13:03:35 -0700
parents d2fa1061df16
children 6cb81dbb9516
files hgext/simple4server.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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'