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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Mar 28 22:49:56 UTC 2018


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

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)
 



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


More information about the Mercurial-devel mailing list