changeset 45719 | c10c87c8fe79 |
parent 45700 | c694b1841a5e |
child 45721 | f9d3ff23bfc0 |
--- a/mercurial/grep.py Tue Oct 13 16:44:57 2020 -0400 +++ b/mercurial/grep.py Wed Sep 09 17:04:44 2020 +0900 @@ -107,6 +107,14 @@ self._skip = set() self._revfiles = {} + def skipfile(self, fn, rev): + """Exclude the given file (and the copy at the specified revision) + from future search""" + copy = self._copies.get(rev, {}).get(fn) + self._skip.add(fn) + if copy: + self._skip.add(copy) + def _grepbody(self, fn, rev, body): self._matches[rev].setdefault(fn, []) m = self._matches[rev][fn]