Patchwork [3,of,5] remotenames: don't call a set of nodes as "revs"

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 5, 2018, 1:29 p.m.
Message ID <ce04586865554a0f3017.1538746198@mimosa>
Download mbox | patch
Permalink /patch/35486/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 5, 2018, 1:29 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1538743008 -32400
#      Fri Oct 05 21:36:48 2018 +0900
# Node ID ce04586865554a0f3017e209ec66268e3ef4091c
# Parent  fe64178103b7155d343f0d4bb02d5ecf8f49981b
remotenames: don't call a set of nodes as "revs"

Patch

diff --git a/hgext/remotenames.py b/hgext/remotenames.py
--- a/hgext/remotenames.py
+++ b/hgext/remotenames.py
@@ -357,7 +357,7 @@  def _revsetutil(repo, subset, x, rtypes)
     else:
         matcher = util.always
 
-    revs = set()
+    nodes = set()
     cl = repo.changelog
     for rtype in rtypes:
         if rtype in repo.names:
@@ -365,10 +365,10 @@  def _revsetutil(repo, subset, x, rtypes)
             for name in ns.listnames(repo):
                 if not matcher(name):
                     continue
-                revs.update(ns.nodes(repo, name))
+                nodes.update(ns.nodes(repo, name))
 
-    results = (cl.rev(n) for n in revs if cl.hasnode(n))
-    return subset & smartset.baseset(sorted(results))
+    revs = (cl.rev(n) for n in nodes if cl.hasnode(n))
+    return subset & smartset.baseset(sorted(revs))
 
 @revsetpredicate('remotenames([name])')
 def remotenamesrevset(repo, subset, x):