mercurial/revlogutils/flagutil.py
changeset 42990 f4caf910669e
parent 42989 36a0a1951d64
child 42991 50d9de61ce02
--- a/mercurial/revlogutils/flagutil.py	Tue Sep 03 23:51:17 2019 +0200
+++ b/mercurial/revlogutils/flagutil.py	Wed Sep 04 00:53:27 2019 +0200
@@ -136,8 +136,8 @@
         processed text and ``validatehash`` is a bool indicating whether the
         returned text should be checked for hash integrity.
         """
-        assert not sidedata # XXX until it is actually processed
-        return self._processflagsfunc(text, flags, 'write')[:2]
+        return self._processflagsfunc(text, flags, 'write',
+                                      sidedata=sidedata)[:2]
 
     def _processflagsraw(self, text, flags):
         """Inspect revision data flags to check is the content hash should be
@@ -157,7 +157,7 @@
         """
         return self._processflagsfunc(text, flags, 'raw')[1]
 
-    def _processflagsfunc(self, text, flags, operation):
+    def _processflagsfunc(self, text, flags, operation, sidedata=None):
         # fast path: no flag processors will run
         if flags == 0:
             return text, True, {}
@@ -196,7 +196,7 @@
                         text, vhash, s = readtransform(self, text)
                         outsidedata.update(s)
                     else: # write operation
-                        text, vhash = writetransform(self, text)
+                        text, vhash = writetransform(self, text, sidedata)
                 validatehash = validatehash and vhash
 
         return text, validatehash, outsidedata