changeset 39985:825a636812a4

narrow: avoid overwriting a variable I don't like to overwrite variables, especially not with a different type (because it makes it harder to explain what the variable is for, and, therefore, to name it well). Differential Revision: https://phab.mercurial-scm.org/D4846
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 02 Oct 2018 09:11:18 -0700
parents 731961d972ba
children 138e2d6d3b53
files hgext/narrow/narrowbundle2.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/narrow/narrowbundle2.py	Thu Sep 27 20:16:48 2018 -0700
+++ b/hgext/narrow/narrowbundle2.py	Tue Oct 02 09:11:18 2018 -0700
@@ -67,11 +67,10 @@
     """
     # XXX: This patch will start sending bundle2 after couple of patches when
     # called from the wireprotocol command
-    common = repo.revs("::%ln", common)
     commonnodes = set()
     cl = repo.changelog
-    for c in common:
-        commonnodes.add(cl.node(c))
+    for r in repo.revs("::%ln", common):
+        commonnodes.add(cl.node(r))
     if commonnodes:
         # XXX: we should only send the filelogs (and treemanifest). user
         # already has the changelog and manifest