diff mercurial/testing/storage.py @ 39878:3e896b51aa5d

storageutil: move metadata parsing and packing from revlog (API) Parsing and writing of revision text metadata is likely identical across storage backends. Let's move the code out of revlog so we don't need to import the revlog module in order to use it. Differential Revision: https://phab.mercurial-scm.org/D4754
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 24 Sep 2018 14:31:31 -0700
parents a269fa55467e
children 2f80eaf38ed4
line wrap: on
line diff
--- a/mercurial/testing/storage.py	Mon Sep 24 14:23:54 2018 -0700
+++ b/mercurial/testing/storage.py	Mon Sep 24 14:31:31 2018 -0700
@@ -19,6 +19,9 @@
     mdiff,
     revlog,
 )
+from ..utils import (
+    storageutil,
+)
 
 class basetestcase(unittest.TestCase):
     if not getattr(unittest.TestCase, r'assertRaisesRegex', False):
@@ -882,7 +885,7 @@
     def testcensored(self):
         f = self._makefilefn()
 
-        stored1 = revlog.packmeta({
+        stored1 = storageutil.packmeta({
             b'censored': b'tombstone',
         }, b'')