diff mercurial/exchange.py @ 49340:04cdb442a892

bundlespec: handle the presence of obsmarker part This make `hg debugbundle --spec` more informative about extra part in the bundle.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 25 May 2022 11:53:34 +0200
parents 6d15a8971e30
children 4188e75af983
line wrap: on
line diff
--- a/mercurial/exchange.py	Wed May 18 12:07:50 2022 +0100
+++ b/mercurial/exchange.py	Wed May 25 11:53:34 2022 +0200
@@ -146,6 +146,10 @@
                 splitted = requirements.split()
                 params = bundle2._formatrequirementsparams(splitted)
                 return b'none-v2;stream=v2;%s' % params
+            elif part.type == b'obsmarkers':
+                params[b'obsolescence'] = b'yes'
+                if not part.mandatory:
+                    params[b'obsolescence-mandatory'] = b'no'
 
         if not version:
             raise error.Abort(