bundle2: advertise the obsmarker part in bundle2 capabilities
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 21 Aug 2014 18:18:38 -0700
changeset 22343 76677a2c1cfd
parent 22342 262c5cc126c1
child 22344 9829b7948100
bundle2: advertise the obsmarker part in bundle2 capabilities
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Mon Aug 25 19:21:47 2014 +0200
+++ b/mercurial/bundle2.py	Thu Aug 21 18:18:38 2014 -0700
@@ -784,10 +784,13 @@
 def getrepocaps(repo):
     """return the bundle2 capabilities for a given repo
 
-    Exists to allow extensions (like evolution) to mutate the
-    capabilities.
+    Exists to allow extensions (like evolution) to mutate the capabilities.
     """
-    return capabilities
+    caps = capabilities.copy()
+    if obsolete._enabled:
+        supportedformat = tuple('V%i' % v for v in obsolete.formats)
+        caps['b2x:obsmarkers'] = supportedformat
+    return caps
 
 def bundle2caps(remote):
     """return the bundlecapabilities of a peer as dict"""