diff hgext/simple4server.py @ 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 48804a8d7472
children 097ddcb0da25
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'