##// END OF EJS Templates
debugcommands: avoid stack trace from debugindexstats in pure mode...
Martin von Zweigbergk -
r40401:4f37af86 default
parent child Browse files
Show More
@@ -1168,7 +1168,10 b' def debugindexdot(ui, repo, file_=None, '
1168 def debugindexstats(ui, repo):
1168 def debugindexstats(ui, repo):
1169 """show stats related to the changelog index"""
1169 """show stats related to the changelog index"""
1170 repo.changelog.shortest(nullid, 1)
1170 repo.changelog.shortest(nullid, 1)
1171 for k, v in sorted(repo.changelog.index.stats().items()):
1171 index = repo.changelog.index
1172 if not util.safehasattr(index, 'stats'):
1173 raise error.Abort(_('debugindexstats only works with native code'))
1174 for k, v in sorted(index.stats().items()):
1172 ui.write('%s: %s\n' % (k, v))
1175 ui.write('%s: %s\n' % (k, v))
1173
1176
1174 @command('debuginstall', [] + cmdutil.formatteropts, '', norepo=True)
1177 @command('debuginstall', [] + cmdutil.formatteropts, '', norepo=True)
@@ -176,7 +176,12 b' Test debugindex, with and without the --'
176
176
177 debugdelta chain basic output
177 debugdelta chain basic output
178
178
179 #if reporevlogstore
179 #if reporevlogstore pure
180 $ hg debugindexstats
181 abort: debugindexstats only works with native code
182 [255]
183 #endif
184 #if reporevlogstore no-pure
180 $ hg debugindexstats
185 $ hg debugindexstats
181 node trie capacity: 4
186 node trie capacity: 4
182 node trie count: 2
187 node trie count: 2
@@ -186,7 +191,9 b' debugdelta chain basic output'
186 node trie misses: 1
191 node trie misses: 1
187 node trie splits: 1
192 node trie splits: 1
188 revs in memory: 3
193 revs in memory: 3
194 #endif
189
195
196 #if reporevlogstore no-pure
190 $ hg debugdeltachain -m
197 $ hg debugdeltachain -m
191 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
198 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
192 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
199 0 1 1 -1 base 44 43 44 1.02326 44 0 0.00000
General Comments 0
You need to be logged in to leave comments. Login now