Show More
@@ -1051,6 +1051,7 b' def walkchangerevs(repo, match, opts, pr' | |||||
1051 | copies = [] |
|
1051 | copies = [] | |
1052 |
|
1052 | |||
1053 | if not slowpath: |
|
1053 | if not slowpath: | |
|
1054 | minrev, maxrev = min(revs), max(revs) | |||
1054 | # Only files, no patterns. Check the history of each file. |
|
1055 | # Only files, no patterns. Check the history of each file. | |
1055 | def filerevgen(filelog, last): |
|
1056 | def filerevgen(filelog, last): | |
1056 | cl_count = len(repo) |
|
1057 | cl_count = len(repo) | |
@@ -1061,16 +1062,20 b' def walkchangerevs(repo, match, opts, pr' | |||||
1061 | revs.append((filelog.linkrev(j), |
|
1062 | revs.append((filelog.linkrev(j), | |
1062 | follow and filelog.renamed(n))) |
|
1063 | follow and filelog.renamed(n))) | |
1063 | for rev in reversed(revs): |
|
1064 | for rev in reversed(revs): | |
|
1065 | linkrev = rev[0] | |||
|
1066 | if linkrev > maxrev: | |||
|
1067 | continue | |||
|
1068 | if linkrev < minrev: | |||
|
1069 | return | |||
1064 | # only yield rev for which we have the changelog, it can |
|
1070 | # only yield rev for which we have the changelog, it can | |
1065 | # happen while doing "hg log" during a pull or commit |
|
1071 | # happen while doing "hg log" during a pull or commit | |
1066 |
if rev |
|
1072 | if linkrev < cl_count: | |
1067 | yield rev |
|
1073 | yield rev | |
1068 | def iterfiles(): |
|
1074 | def iterfiles(): | |
1069 | for filename in match.files(): |
|
1075 | for filename in match.files(): | |
1070 | yield filename, None |
|
1076 | yield filename, None | |
1071 | for filename_node in copies: |
|
1077 | for filename_node in copies: | |
1072 | yield filename_node |
|
1078 | yield filename_node | |
1073 | minrev, maxrev = min(revs), max(revs) |
|
|||
1074 | for file_, node in iterfiles(): |
|
1079 | for file_, node in iterfiles(): | |
1075 | filelog = repo.file(file_) |
|
1080 | filelog = repo.file(file_) | |
1076 | if not len(filelog): |
|
1081 | if not len(filelog): | |
@@ -1091,14 +1096,11 b' def walkchangerevs(repo, match, opts, pr' | |||||
1091 | last = filelog.rev(node) |
|
1096 | last = filelog.rev(node) | |
1092 |
|
1097 | |||
1093 | for rev, copied in filerevgen(filelog, last): |
|
1098 | for rev, copied in filerevgen(filelog, last): | |
1094 | if rev <= maxrev: |
|
1099 | fncache.setdefault(rev, []) | |
1095 | if rev < minrev: |
|
1100 | fncache[rev].append(file_) | |
1096 |
|
|
1101 | wanted.add(rev) | |
1097 | fncache.setdefault(rev, []) |
|
1102 | if copied: | |
1098 |
|
|
1103 | copies.append(copied) | |
1099 | wanted.add(rev) |
|
|||
1100 | if copied: |
|
|||
1101 | copies.append(copied) |
|
|||
1102 | if slowpath: |
|
1104 | if slowpath: | |
1103 | if follow: |
|
1105 | if follow: | |
1104 | raise util.Abort(_('can only follow copies/renames for explicit ' |
|
1106 | raise util.Abort(_('can only follow copies/renames for explicit ' |
General Comments 0
You need to be logged in to leave comments.
Login now