Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 11631:dbb98d8fbcaf
log: slowpath: only walk specified revision range during preparation
Even with --removed, it does not make sense to examine changesets outside
of the revision range that was specified by the user: the last phase only
yields a subset of (revs), preparation phase hence only has to examine
(revs) to fill correctly fncache.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 14:13:33 +0900 |
parents | e8b9942f5254 |
children | f418d2570920 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jul 20 15:07:10 2010 -0500 +++ b/mercurial/cmdutil.py Tue Jul 20 14:13:33 2010 +0900 @@ -1106,15 +1106,7 @@ 'filenames')) # The slow path checks files modified in every changeset. - if opts.get('removed'): - # --removed wants to yield the changes where the file - # was removed, this means that we have to explore all - # changesets, effectively ignoring the revisions that - # had been passed as arguments - revlist = xrange(nullrev, len(repo) - 1) - else: - revlist = sorted(revs) - for i in revlist: + for i in sorted(revs): ctx = change(i) matches = filter(match, ctx.files()) if matches: