changeset 11613:e8b9942f5254

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.
author Martin Geisler <mg@lazybytes.net>
date Mon, 19 Jul 2010 00:41:41 +0200
parents 26175823b9d4
children 76bab169e151
files mercurial/cmdutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: