Patchwork D2961: locate: avoid using "rev" variable name for nodeid

login
register
mail settings
Submitter phabricator
Date March 28, 2018, 10:49 p.m.
Message ID <differential-rev-PHID-DREV-a4gx6eq7iw25kw2phn55-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29925/
State Superseded
Headers show

Comments

phabricator - March 28, 2018, 10:49 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Also, drop silly "ctx = repo[ctx.node()]".

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3255,10 +3255,9 @@ 
         end = '\0'
     else:
         end = '\n'
-    rev = scmutil.revsingle(repo, opts.get('rev'), None).node()
+    ctx = scmutil.revsingle(repo, opts.get('rev'), None)
 
     ret = 1
-    ctx = repo[rev]
     m = scmutil.match(ctx, pats, opts, default='relglob',
                       badfn=lambda x, y: False)