Show More
@@ -1045,12 +1045,19 def walkchangerevs(repo, match, opts, pr | |||||
1045 | fncache = {} |
|
1045 | fncache = {} | |
1046 | change = util.cachefunc(repo.changectx) |
|
1046 | change = util.cachefunc(repo.changectx) | |
1047 |
|
1047 | |||
|
1048 | # First step is to fill wanted, the set of revisions that we want to yield. | |||
|
1049 | # When it does not induce extra cost, we also fill fncache for revisions in | |||
|
1050 | # wanted: a cache of filenames that were changed (ctx.files()) and that | |||
|
1051 | # match the file filtering conditions. | |||
|
1052 | ||||
1048 | if not slowpath and not match.files(): |
|
1053 | if not slowpath and not match.files(): | |
1049 | # No files, no patterns. Display all revs. |
|
1054 | # No files, no patterns. Display all revs. | |
1050 | wanted = set(revs) |
|
1055 | wanted = set(revs) | |
1051 | copies = [] |
|
1056 | copies = [] | |
1052 |
|
1057 | |||
1053 | if not slowpath: |
|
1058 | if not slowpath: | |
|
1059 | # We only have to read through the filelog to find wanted revisions | |||
|
1060 | ||||
1054 | minrev, maxrev = min(revs), max(revs) |
|
1061 | minrev, maxrev = min(revs), max(revs) | |
1055 | # Only files, no patterns. Check the history of each file. |
|
1062 | # Only files, no patterns. Check the history of each file. | |
1056 | def filerevgen(filelog, last): |
|
1063 | def filerevgen(filelog, last): | |
@@ -1101,6 +1108,9 def walkchangerevs(repo, match, opts, pr | |||||
1101 | if copied: |
|
1108 | if copied: | |
1102 | copies.append(copied) |
|
1109 | copies.append(copied) | |
1103 | if slowpath: |
|
1110 | if slowpath: | |
|
1111 | # We have to read the changelog to match filenames against | |||
|
1112 | # changed files | |||
|
1113 | ||||
1104 | if follow: |
|
1114 | if follow: | |
1105 | raise util.Abort(_('can only follow copies/renames for explicit ' |
|
1115 | raise util.Abort(_('can only follow copies/renames for explicit ' | |
1106 | 'filenames')) |
|
1116 | 'filenames')) | |
@@ -1160,6 +1170,8 def walkchangerevs(repo, match, opts, pr | |||||
1160 | if ff.match(x): |
|
1170 | if ff.match(x): | |
1161 | wanted.discard(x) |
|
1171 | wanted.discard(x) | |
1162 |
|
1172 | |||
|
1173 | # Now that wanted is correctly initialized, we can iterate over the | |||
|
1174 | # revision range, yielding only revisions in wanted. | |||
1163 | def iterate(): |
|
1175 | def iterate(): | |
1164 | if follow and not match.files(): |
|
1176 | if follow and not match.files(): | |
1165 | ff = followfilter(onlyfirst=opts.get('follow_first')) |
|
1177 | ff = followfilter(onlyfirst=opts.get('follow_first')) |
General Comments 0
You need to be logged in to leave comments.
Login now