comparison mercurial/cmdutil.py @ 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 890ad9d6a169
children dbb98d8fbcaf
comparison
equal deleted inserted replaced
11610:26175823b9d4 11613:e8b9942f5254
1109 if opts.get('removed'): 1109 if opts.get('removed'):
1110 # --removed wants to yield the changes where the file 1110 # --removed wants to yield the changes where the file
1111 # was removed, this means that we have to explore all 1111 # was removed, this means that we have to explore all
1112 # changesets, effectively ignoring the revisions that 1112 # changesets, effectively ignoring the revisions that
1113 # had been passed as arguments 1113 # had been passed as arguments
1114 revrange = xrange(nullrev, len(repo) - 1) 1114 revlist = xrange(nullrev, len(repo) - 1)
1115 else: 1115 else:
1116 revrange = sorted(revs) 1116 revlist = sorted(revs)
1117 for i in revrange: 1117 for i in revlist:
1118 ctx = change(i) 1118 ctx = change(i)
1119 matches = filter(match, ctx.files()) 1119 matches = filter(match, ctx.files())
1120 if matches: 1120 if matches:
1121 fncache[i] = matches 1121 fncache[i] = matches
1122 wanted.add(i) 1122 wanted.add(i)