Patchwork D2424: cmdutil: use ctx.rev() instead of int(ctx)

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 7:31 p.m.
Message ID <differential-rev-PHID-DREV-6ku4wqeyhc25rsfotr5n-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28332/
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
  Continuing to wean off basectx.__int__.

REPOSITORY
  rHG Mercurial

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

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
@@ -2578,9 +2578,9 @@ 
                 repo.ui.status(_('reopening closed branch head %d\n') % r)
 
     if repo.ui.debugflag:
-        repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx.hex()))
+        repo.ui.write(_('committed changeset %d:%s\n') % (ctx.rev(), ctx.hex()))
     elif repo.ui.verbose:
-        repo.ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx))
+        repo.ui.write(_('committed changeset %d:%s\n') % (ctx.rev(), ctx))
 
 def postcommitstatus(repo, pats, opts):
     return repo.status(match=scmutil.match(repo[None], pats, opts))