comparison 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
comparison
equal deleted inserted replaced
48022:f2a9db29cb2d 48023:357307feaf61
116 return pycompat.iteritems(self._map) 116 return pycompat.iteritems(self._map)
117 117
118 # forward for python2,3 compat 118 # forward for python2,3 compat
119 iteritems = items 119 iteritems = items
120 120
121 debug_iter = items 121 def debug_iter(self, all):
122 """
123 `all` is unused when Rust is not enabled
124 """
125 return self.item()
122 126
123 def __len__(self): 127 def __len__(self):
124 return len(self._map) 128 return len(self._map)
125 129
126 def __iter__(self): 130 def __iter__(self):
698 702
699 @property 703 @property
700 def copymap(self): 704 def copymap(self):
701 return self._rustmap.copymap() 705 return self._rustmap.copymap()
702 706
703 def debug_iter(self): 707 def debug_iter(self, all):
704 return self._rustmap.debug_iter() 708 return self._rustmap.debug_iter(all)
705 709
706 def preload(self): 710 def preload(self):
707 self._rustmap 711 self._rustmap
708 712
709 def clear(self): 713 def clear(self):