diff mercurial/dirstatemap.py @ 48023:357307feaf61

debugstate: Always call dirstatemap.debug_iter() ? passing it a new `all` argument for the `--all` CLI option, instead of conditionally calling `.debug_iter()` or `.items()` This prepares for the next commit. Differential Revision: https://phab.mercurial-scm.org/D11462
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 20 Sep 2021 19:59:09 +0200
parents a83e24c3af6b
children cedfe2606adf
line wrap: on
line diff
--- a/mercurial/dirstatemap.py	Fri Sep 17 13:33:45 2021 +0200
+++ b/mercurial/dirstatemap.py	Mon Sep 20 19:59:09 2021 +0200
@@ -118,7 +118,11 @@
     # forward for python2,3 compat
     iteritems = items
 
-    debug_iter = items
+    def debug_iter(self, all):
+        """
+        `all` is unused when Rust is not enabled
+        """
+        return self.item()
 
     def __len__(self):
         return len(self._map)
@@ -700,8 +704,8 @@
         def copymap(self):
             return self._rustmap.copymap()
 
-        def debug_iter(self):
-            return self._rustmap.debug_iter()
+        def debug_iter(self, all):
+            return self._rustmap.debug_iter(all)
 
         def preload(self):
             self._rustmap