mercurial/exchange.py
changeset 22353 47e3420ae889
parent 22352 dc371d1f0de1
child 22354 a89add6c6b2f
--- a/mercurial/exchange.py	Fri Aug 29 12:28:58 2014 +0200
+++ b/mercurial/exchange.py	Fri Aug 29 12:36:17 2014 +0200
@@ -999,10 +999,21 @@
         part.addparam('namespace', namespace)
         keys = repo.listkeys(namespace).items()
         part.data = pushkey.encodekeys(keys)
+    _getbundleobsmarkerpart(bundler, repo, source, heads=heads, common=common,
+                            bundlecaps=bundlecaps, **kwargs)
     _getbundleextrapart(bundler, repo, source, heads=heads, common=common,
                         bundlecaps=bundlecaps, **kwargs)
     return util.chunkbuffer(bundler.getchunks())
 
+def _getbundleobsmarkerpart(bundler, repo, source, heads=None, common=None,
+                            bundlecaps=None, **kwargs):
+    if kwargs.get('obsmarkers', False):
+        if heads is None:
+            heads = repo.heads()
+        subset = [c.node() for c in repo.set('::%ln', heads)]
+        markers = repo.obsstore.relevantmarkers(subset)
+        buildobsmarkerspart(bundler, markers)
+
 def _getbundleextrapart(bundler, repo, source, heads=None, common=None,
                         bundlecaps=None, **kwargs):
     """hook function to let extensions add parts to the requested bundle"""