# HG changeset patch # User Martin Geisler # Date 1279492901 -7200 # Node ID e8b9942f5254ba0d850d2014d278796d25215ba5 # Parent 26175823b9d4e50dc5fc7fcf9120bd1519cbbc92 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. diff -r 26175823b9d4 -r e8b9942f5254 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: