scmutil: 0-pad transaction report callback category
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 19 Jan 2018 11:35:55 -0800
changeset 35748 963a611b2f39
parent 35747 de32acb24949
child 35749 3a3b59bbe7ce
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
mercurial/scmutil.py
--- 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