##// END OF EJS Templates
debugindexstats: handle the lack of Rust support better...
Raphaël Gomès -
r52125:3551f2a1 default
parent child Browse files
Show More
@@ -1860,7 +1860,7 b' def debugindexstats(ui, repo):'
1860 repo.changelog.shortest(repo.nullid, 1)
1860 repo.changelog.shortest(repo.nullid, 1)
1861 index = repo.changelog.index
1861 index = repo.changelog.index
1862 if not hasattr(index, 'stats'):
1862 if not hasattr(index, 'stats'):
1863 raise error.Abort(_(b'debugindexstats only works with native code'))
1863 raise error.Abort(_(b'debugindexstats only works with native C code'))
1864 for k, v in sorted(index.stats().items()):
1864 for k, v in sorted(index.stats().items()):
1865 ui.write(b'%s: %d\n' % (k, v))
1865 ui.write(b'%s: %d\n' % (k, v))
1866
1866
@@ -405,11 +405,6 b' py_class!(pub class MixedIndex |py| {'
405 Ok(rust_res)
405 Ok(rust_res)
406 }
406 }
407
407
408 /// stats for the index
409 def stats(&self, *args, **kw) -> PyResult<PyObject> {
410 self.call_cindex(py, "stats", args, kw)
411 }
412
413 // index_sequence_methods and index_mapping_methods.
408 // index_sequence_methods and index_mapping_methods.
414 //
409 //
415 // Since we call back through the high level Python API,
410 // Since we call back through the high level Python API,
@@ -185,12 +185,12 b' Test debugindex, with and without the --'
185
185
186 debugdelta chain basic output
186 debugdelta chain basic output
187
187
188 #if reporevlogstore pure
188 #if reporevlogstore pure rust
189 $ hg debugindexstats
189 $ hg debugindexstats
190 abort: debugindexstats only works with native code
190 abort: debugindexstats only works with native C code
191 [255]
191 [255]
192 #endif
192 #endif
193 #if reporevlogstore no-pure
193 #if reporevlogstore no-pure no-rust
194 $ hg debugindexstats
194 $ hg debugindexstats
195 node trie capacity: 4
195 node trie capacity: 4
196 node trie count: 2
196 node trie count: 2
General Comments 0
You need to be logged in to leave comments. Login now