comparison 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
comparison
equal deleted inserted replaced
11630:0c23085f051f 11631:dbb98d8fbcaf
1104 if follow: 1104 if follow:
1105 raise util.Abort(_('can only follow copies/renames for explicit ' 1105 raise util.Abort(_('can only follow copies/renames for explicit '
1106 'filenames')) 1106 'filenames'))
1107 1107
1108 # The slow path checks files modified in every changeset. 1108 # The slow path checks files modified in every changeset.
1109 if opts.get('removed'): 1109 for i in sorted(revs):
1110 # --removed wants to yield the changes where the file
1111 # was removed, this means that we have to explore all
1112 # changesets, effectively ignoring the revisions that
1113 # had been passed as arguments
1114 revlist = xrange(nullrev, len(repo) - 1)
1115 else:
1116 revlist = sorted(revs)
1117 for i in revlist:
1118 ctx = change(i) 1110 ctx = change(i)
1119 matches = filter(match, ctx.files()) 1111 matches = filter(match, ctx.files())
1120 if matches: 1112 if matches:
1121 fncache[i] = matches 1113 fncache[i] = matches
1122 wanted.add(i) 1114 wanted.add(i)