mercurial/bundle2.py
changeset 40398 0ac794e0e285
parent 40372 81c80ed7c991
child 40399 4ab6e7b4fe8a
--- a/mercurial/bundle2.py	Fri Oct 19 18:34:42 2018 -0400
+++ b/mercurial/bundle2.py	Fri Oct 05 23:27:17 2018 +0800
@@ -1697,8 +1697,15 @@
     if (includepats or excludepats) and not narrowstream:
         raise error.Abort(_('server does not support narrow stream clones'))
 
+    includeobsmarkers = False
+    if repo.obsstore:
+        remoteversions = obsmarkersversion(bundler.capabilities)
+        if repo.obsstore._version in remoteversions:
+            includeobsmarkers = True
+
     filecount, bytecount, it = streamclone.generatev2(repo, includepats,
-                                                      excludepats)
+                                                      excludepats,
+                                                      includeobsmarkers)
     requirements = _formatrequirementsspec(repo.requirements)
     part = bundler.newpart('stream2', data=it)
     part.addparam('bytecount', '%d' % bytecount, mandatory=True)