Patchwork D1917: scmutil: 0-pad transaction report callback category

login
register
mail settings
Submitter phabricator
Date Jan. 19, 2018, 8:51 p.m.
Message ID <differential-rev-PHID-DREV-olytyderljp3kydvfhqi-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26979/
State Superseded
Headers show

Comments

phabricator - Jan. 19, 2018, 8:51 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1917

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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