From patchwork Fri Jan 19 20:51:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1917: scmutil: 0-pad transaction report callback category From: phabricator X-Patchwork-Id: 26979 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 19 Jan 2018 20:51:55 +0000 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 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