diff tests/test-parseindex2.py @ 52896:8de68446a5bd

index: remember the generaldelta config instead of getting it from the revlog The code (especially the Rust code) was jumping in 4 dimensions to make sense of what was going on because it wrongly assumed that we needed to somehow be able to ask a generaldelta index for a non-generaldelta delta chain, which doesn't make any sense. Removing the cargo-culted/vestigial code, this is cleaner and less confusing.
author Rapha?l Gom?s <rgomes@octobus.net>
date Thu, 13 Feb 2025 13:13:05 +0100
parents e08c878b5571
children
line wrap: on
line diff
--- a/tests/test-parseindex2.py	Thu Feb 13 13:10:11 2025 +0100
+++ b/tests/test-parseindex2.py	Thu Feb 13 13:13:05 2025 +0100
@@ -135,7 +135,7 @@
 
 
 def parse_index2(data, inline, format=constants.REVLOGV1):
-    index, chunkcache = parsers.parse_index2(data, inline, format=format)
+    index, chunkcache = parsers.parse_index2(data, inline, False, format=format)
     return list(index), chunkcache
 
 
@@ -226,7 +226,7 @@
     def testbadargs(self):
         # Check that parse_index2() raises TypeError on bad arguments.
         with self.assertRaises(TypeError):
-            parse_index2(0, True)
+            parse_index2(0, True, False)
 
     def testparseindexfile(self):
         # Check parsers.parse_index2() on an index file against the
@@ -241,7 +241,7 @@
         got = parse_index2(data_non_inlined, False)
         self.assertEqual(want, got)  # no inline data
 
-        ix = parsers.parse_index2(data_inlined, True)[0]
+        ix = parsers.parse_index2(data_inlined, True, False)[0]
         for i, r in enumerate(ix):
             if r[7] == sha1nodeconstants.nullid:
                 i = -1
@@ -271,16 +271,16 @@
             constants.COMP_MODE_INLINE,
             constants.RANK_UNKNOWN,
         )
-        index, junk = parsers.parse_index2(data_inlined, True)
+        index, junk = parsers.parse_index2(data_inlined, True, False)
         got = index[-1]
         self.assertEqual(want, got)  # inline data
 
-        index, junk = parsers.parse_index2(data_non_inlined, False)
+        index, junk = parsers.parse_index2(data_non_inlined, False, False)
         got = index[-1]
         self.assertEqual(want, got)  # no inline data
 
     def testdelitemwithoutnodetree(self):
-        index, _junk = parsers.parse_index2(data_non_inlined, False)
+        index, _junk = parsers.parse_index2(data_non_inlined, False, False)
 
         def hexrev(rev):
             if rev == nullrev: