hgext/simple4server.py
changeset 882 48804a8d7472
parent 878 5cb2744a6d36
child 884 4ae115cf3efd
--- a/hgext/simple4server.py	Mon Mar 10 19:47:24 2014 -0700
+++ b/hgext/simple4server.py	Wed Mar 12 12:44:33 2014 -0700
@@ -24,6 +24,21 @@
 from mercurial.hgweb import hgweb_mod
 _pack = struct.pack
 
+# Start of simple4server specific content
+
+from mercurial import pushkey
+
+# specific content also include the wrapping int extsetup
+def _nslist(orig, repo):
+    rep = orig(repo)
+    if not repo.ui.configbool('__temporary__', 'advertiseobsolete', True):
+        rep.pop('obsolete')
+    return rep
+
+# End of simple4server specific content
+
+
+
 # from evolve extension: 1a23c7c52a43
 def srv_pushobsmarkers(repo, proto):
     """That receives a stream of markers and apply then to the repo"""
@@ -231,3 +246,6 @@
         return capabilities(oldcap, repo, proto)
     wireproto.commands['capabilities'] = (newcap, args)
     wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes')
+    # specific simple4server content
+    extensions.wrapfunction(pushkey, '_nslist', _nslist)
+    pushkey._namespaces['namespaces'] = (lambda *x: False, pushkey._nslist)