126 # No files, no patterns. Display all revs. |
126 # No files, no patterns. Display all revs. |
127 wanted = dict(zip(revs, revs)) |
127 wanted = dict(zip(revs, revs)) |
128 if not slowpath: |
128 if not slowpath: |
129 # Only files, no patterns. Check the history of each file. |
129 # Only files, no patterns. Check the history of each file. |
130 def filerevgen(filelog): |
130 def filerevgen(filelog): |
|
131 cl_count = repo.changelog.count() |
131 for i, window in increasing_windows(filelog.count()-1, -1): |
132 for i, window in increasing_windows(filelog.count()-1, -1): |
132 revs = [] |
133 revs = [] |
133 for j in xrange(i - window, i + 1): |
134 for j in xrange(i - window, i + 1): |
134 revs.append(filelog.linkrev(filelog.node(j))) |
135 revs.append(filelog.linkrev(filelog.node(j))) |
135 revs.reverse() |
136 revs.reverse() |
136 for rev in revs: |
137 for rev in revs: |
137 yield rev |
138 # only yield rev for which we have the changelog, it can |
|
139 # happen while doing "hg log" during a pull or commit |
|
140 if rev < cl_count: |
|
141 yield rev |
138 |
142 |
139 minrev, maxrev = min(revs), max(revs) |
143 minrev, maxrev = min(revs), max(revs) |
140 for file_ in files: |
144 for file_ in files: |
141 filelog = repo.file(file_) |
145 filelog = repo.file(file_) |
142 # A zero count may be a directory or deleted file, so |
146 # A zero count may be a directory or deleted file, so |