diff mercurial/changegroup.py @ 46725:e8c11a2c96c0

delta: add sidedata field to revision delta When emitting revision delta, we need to also emit the sidedata information just added in the revlogv2 format if appropriate. Differential Revision: https://phab.mercurial-scm.org/D10027
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 18 Feb 2021 18:18:35 +0100
parents a41565bef69f
children bc2519513ae0
line wrap: on
line diff
--- a/mercurial/changegroup.py	Thu Feb 18 17:36:52 2021 +0100
+++ b/mercurial/changegroup.py	Thu Feb 18 18:18:35 2021 +0100
@@ -618,6 +618,13 @@
         yield prefix
     yield data
 
+    sidedata = delta.sidedata
+    if sidedata is not None:
+        # Need a separate chunk for sidedata to be able to differentiate
+        # "raw delta" length and sidedata length
+        yield chunkheader(len(sidedata))
+        yield sidedata
+
 
 def _sortnodesellipsis(store, nodes, cl, lookup):
     """Sort nodes for changegroup generation."""