Mercurial > hg
comparison mercurial/cmdutil.py @ 11635:4da35e02b67c
log: do not redefine cachefunc in walkchangerevs
The same variable is defined a few blocks earlier. The first phases in
walkchangerevs should in fact fill that cache, and allow faster lookups
in the last phase. Redefining and overriding this cached function, (knowing
that it will be called with the same arguments) defeats the caching purpose.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 14:42:05 +0900 |
parents | 09147c065711 |
children | 15aa42aaae4c |
comparison
equal
deleted
inserted
replaced
11634:09147c065711 | 11635:4da35e02b67c |
---|---|
1180 else: | 1180 else: |
1181 def want(rev): | 1181 def want(rev): |
1182 return rev in wanted | 1182 return rev in wanted |
1183 | 1183 |
1184 for i, window in increasing_windows(0, len(revs)): | 1184 for i, window in increasing_windows(0, len(revs)): |
1185 change = util.cachefunc(repo.changectx) | |
1186 nrevs = [rev for rev in revs[i:i + window] if want(rev)] | 1185 nrevs = [rev for rev in revs[i:i + window] if want(rev)] |
1187 for rev in sorted(nrevs): | 1186 for rev in sorted(nrevs): |
1188 fns = fncache.get(rev) | 1187 fns = fncache.get(rev) |
1189 ctx = change(rev) | 1188 ctx = change(rev) |
1190 if not fns: | 1189 if not fns: |