We use pycompat.bytestr() and to convert str to bytes and '%d' for ints instead
of '%s'.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Comment Actions
- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1172,7 +1172,7 @@if not util.safehasattr(index, 'stats'): raise error.Abort(_('debugindexstats only works with native code')) for k, v in sorted(index.stats().items()):
- ui.write('%s: %s\n' % (k, v))
+ ui.write('%s: %d\n' % (pycompat.bytestr(k), v))
Bad luck, we're no longer able to use PyDict_SetItemString().
Can you add TODO comment here? This is a bug of the C extension, and sysstr()
should be removed if it get fixed.