##// END OF EJS Templates
log: document the different phases in walkchangerevs
Nicolas Dumazet -
r11632:f418d257 default
parent child Browse files
Show More
@@ -1045,12 +1045,19 b' def walkchangerevs(repo, match, opts, pr'
1045 1045 fncache = {}
1046 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 1053 if not slowpath and not match.files():
1049 1054 # No files, no patterns. Display all revs.
1050 1055 wanted = set(revs)
1051 1056 copies = []
1052 1057
1053 1058 if not slowpath:
1059 # We only have to read through the filelog to find wanted revisions
1060
1054 1061 minrev, maxrev = min(revs), max(revs)
1055 1062 # Only files, no patterns. Check the history of each file.
1056 1063 def filerevgen(filelog, last):
@@ -1101,6 +1108,9 b' def walkchangerevs(repo, match, opts, pr'
1101 1108 if copied:
1102 1109 copies.append(copied)
1103 1110 if slowpath:
1111 # We have to read the changelog to match filenames against
1112 # changed files
1113
1104 1114 if follow:
1105 1115 raise util.Abort(_('can only follow copies/renames for explicit '
1106 1116 'filenames'))
@@ -1160,6 +1170,8 b' def walkchangerevs(repo, match, opts, pr'
1160 1170 if ff.match(x):
1161 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 1175 def iterate():
1164 1176 if follow and not match.files():
1165 1177 ff = followfilter(onlyfirst=opts.get('follow_first'))
General Comments 0
You need to be logged in to leave comments. Login now