Patchwork D2428: cmdutil: use ctx.rev() instead of %d % ctx

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 7:31 p.m.
Message ID <differential-rev-PHID-DREV-2rp5eltfjxd3mmjufenk-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28337/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 7:31 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Weaning off basectx.__int__.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2575,7 +2575,7 @@ 
     if not opts.get('close_branch'):
         for r in parents:
             if r.closesbranch() and r.branch() == branch:
-                repo.ui.status(_('reopening closed branch head %d\n') % r)
+                repo.ui.status(_('reopening closed branch head %d\n') % r.rev())
 
     if repo.ui.debugflag:
         repo.ui.write(_('committed changeset %d:%s\n') % (ctx.rev(), ctx.hex()))