changeset 35748:963a611b2f39

scmutil: 0-pad transaction report callback category Before this patch, the transaction name was '%2i-txnreport', which means the first one would be ' 0-txnreport'. It seems more intuitive for sorting purposes (the callbacks are called in lexicographical order) to make it 0-padded. Differential Revision: https://phab.mercurial-scm.org/D1917
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 19 Jan 2018 11:35:55 -0800
parents de32acb24949
children 3a3b59bbe7ce
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Wed Jan 17 16:01:06 2018 +0100
+++ b/mercurial/scmutil.py	Fri Jan 19 11:35:55 2018 -0800
@@ -1247,7 +1247,7 @@
             if filtername:
                 repo = repo.filtered(filtername)
             func(repo, tr)
-        newcat = '%2i-txnreport' % len(categories)
+        newcat = '%02i-txnreport' % len(categories)
         otr.addpostclose(newcat, wrapped)
         categories.append(newcat)
         return wrapped