diff tests/simplestorerepo.py @ 37442:0596d27457c6

revlog: move parsemeta() and packmeta() from filelog (API) filelog.parsemeta() and filelog.packmeta() are used to decode and encode metadata for file copies and censor. An upcoming commit will move the core logic for censoring revlogs into revlog.py. This would create a cycle between revlog.py and filelog.py. So we move these metadata functions to revlog.py. .. api:: filelog.parsemeta() and filelog.packmeta() have been moved to the revlog module. Differential Revision: https://phab.mercurial-scm.org/D3150
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 05 Apr 2018 18:22:35 -0700
parents a3202fa83aff
children 404eab7ff33f
line wrap: on
line diff
--- a/tests/simplestorerepo.py	Thu Apr 05 15:18:23 2018 -0700
+++ b/tests/simplestorerepo.py	Thu Apr 05 18:22:35 2018 -0700
@@ -32,7 +32,6 @@
     bundlerepo,
     error,
     extensions,
-    filelog,
     localrepo,
     mdiff,
     pycompat,
@@ -326,7 +325,7 @@
             return False
 
         fulltext = self.revision(node)
-        m = filelog.parsemeta(fulltext)[0]
+        m = revlog.parsemeta(fulltext)[0]
 
         if m and 'copy' in m:
             return m['copy'], bin(m['copyrev'])
@@ -415,7 +414,7 @@
 
     def add(self, text, meta, transaction, linkrev, p1, p2):
         if meta or text.startswith(b'\1\n'):
-            text = filelog.packmeta(meta, text)
+            text = revlog.packmeta(meta, text)
 
         return self.addrevision(text, transaction, linkrev, p1, p2)