Show More
@@ -3549,9 +3549,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||
|
3549 | 3549 | r = display(fm, fn, ctx, pstates, states) |
|
3550 | 3550 | found = found or r |
|
3551 | 3551 | if r and not diff and not all_files: |
|
3552 |
s |
|
|
3553 | if copy: | |
|
3554 | skip.add(copy) | |
|
3552 | searcher.skipfile(fn, rev) | |
|
3555 | 3553 | del revfiles[rev] |
|
3556 | 3554 | # We will keep the matches dict for the duration of the window |
|
3557 | 3555 | # clear the matches dict once the window is over |
@@ -107,6 +107,14 b' class grepsearcher(object):' | |||
|
107 | 107 | self._skip = set() |
|
108 | 108 | self._revfiles = {} |
|
109 | 109 | |
|
110 | def skipfile(self, fn, rev): | |
|
111 | """Exclude the given file (and the copy at the specified revision) | |
|
112 | from future search""" | |
|
113 | copy = self._copies.get(rev, {}).get(fn) | |
|
114 | self._skip.add(fn) | |
|
115 | if copy: | |
|
116 | self._skip.add(copy) | |
|
117 | ||
|
110 | 118 | def _grepbody(self, fn, rev, body): |
|
111 | 119 | self._matches[rev].setdefault(fn, []) |
|
112 | 120 | m = self._matches[rev][fn] |
General Comments 0
You need to be logged in to leave comments.
Login now