D2962: tag: avoid using "r" variable name for nodeid

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


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

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
@@ -5311,12 +5311,12 @@
             if not opts.get('force') and bheads and p1 not in bheads:
                 raise error.Abort(_('working directory is not at a branch head '
                                     '(use -f to force)'))
-        r = scmutil.revsingle(repo, rev_).node()
+        node = scmutil.revsingle(repo, rev_).node()
 
         if not message:
             # we don't translate commit messages
             message = ('Added tag %s for changeset %s' %
-                       (', '.join(names), short(r)))
+                       (', '.join(names), short(node)))
 
         date = opts.get('date')
         if date:
@@ -5334,7 +5334,7 @@
             scmutil.revsingle(repo, rev_).rev() == nullrev):
             raise error.Abort(_("cannot tag null revision"))
 
-        tagsmod.tag(repo, names, r, message, opts.get('local'),
+        tagsmod.tag(repo, names, node, message, opts.get('local'),
                     opts.get('user'), date, editor=editor)
     finally:
         release(lock, wlock)



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


More information about the Mercurial-devel mailing list