cmdutil: fix accidental name clash with revrange function
authorMartin Geisler <mg@lazybytes.net>
Mon, 19 Jul 2010 00:41:41 +0200
changeset 11613 e8b9942f5254
parent 11610 26175823b9d4
child 11614 76bab169e151
cmdutil: fix accidental name clash with revrange function The revrange function was used further up, and when a local variable is defined with the same name, the earlier call to revrange becomes a 'local variable used before assignment' error. The clash was introduced in 890ad9d6a169.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sun Jul 18 18:11:59 2010 +0900
+++ b/mercurial/cmdutil.py	Mon Jul 19 00:41:41 2010 +0200
@@ -1111,10 +1111,10 @@
             # was removed, this means that we have to explore all
             # changesets, effectively ignoring the revisions that
             # had been passed as arguments
-            revrange = xrange(nullrev, len(repo) - 1)
+            revlist = xrange(nullrev, len(repo) - 1)
         else:
-            revrange = sorted(revs)
-        for i in revrange:
+            revlist = sorted(revs)
+        for i in revlist:
             ctx = change(i)
             matches = filter(match, ctx.files())
             if matches: