changeset 51467:780fc16b62e6 stable

bundle2: make the "hgtagsfnodes" part advisory This bundle2 part is about helping the client to warms its cache. There is no reason for it to be mandatory. So we mark it advisory.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 28 Mar 2024 07:12:09 +0000
parents 4ee50d98d35c
children 803e61387e86
files mercurial/bundle2.py tests/test-tags.t
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Mon Mar 25 02:09:15 2024 +0100
+++ b/mercurial/bundle2.py	Thu Mar 28 07:12:09 2024 +0000
@@ -1822,7 +1822,11 @@
             chunks.extend([node, fnode])
 
     if chunks:
-        bundler.newpart(b'hgtagsfnodes', data=b''.join(chunks))
+        bundler.newpart(
+            b'hgtagsfnodes',
+            mandatory=False,
+            data=b''.join(chunks),
+        )
 
 
 def addpartrevbranchcache(repo, bundler, outgoing):
--- a/tests/test-tags.t	Mon Mar 25 02:09:15 2024 +0100
+++ b/tests/test-tags.t	Thu Mar 28 07:12:09 2024 +0000
@@ -855,7 +855,7 @@
       c4dab0c2fd337eb9191f80c3024830a4889a8f34
       f63cc8fe54e4d326f8d692805d70e092f851ddb1
       40f0358cb314c824a5929ee527308d90e023bc10
-  hgtagsfnodes -- {} (mandatory: True)
+  hgtagsfnodes -- {} (mandatory: False)
   cache:rev-branch-cache -- {} (mandatory: False)
 
 Check that local clone includes cache data