Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 45719:c10c87c8fe79
grep: extract public function to register file to be skipped
The main grep loop will be extracted to a searcher method, but this skipping
condition depends on the result of display() function.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 09 Sep 2020 17:04:44 +0900 |
parents | c694b1841a5e |
children | 508dfd1c18df |
comparison
equal
deleted
inserted
replaced
45718:87c35b5a14eb | 45719:c10c87c8fe79 |
---|---|
3547 pstates = matches.get(parent, {}).get(copy or fn, []) | 3547 pstates = matches.get(parent, {}).get(copy or fn, []) |
3548 if pstates or states: | 3548 if pstates or states: |
3549 r = display(fm, fn, ctx, pstates, states) | 3549 r = display(fm, fn, ctx, pstates, states) |
3550 found = found or r | 3550 found = found or r |
3551 if r and not diff and not all_files: | 3551 if r and not diff and not all_files: |
3552 skip.add(fn) | 3552 searcher.skipfile(fn, rev) |
3553 if copy: | |
3554 skip.add(copy) | |
3555 del revfiles[rev] | 3553 del revfiles[rev] |
3556 # We will keep the matches dict for the duration of the window | 3554 # We will keep the matches dict for the duration of the window |
3557 # clear the matches dict once the window is over | 3555 # clear the matches dict once the window is over |
3558 if not revfiles: | 3556 if not revfiles: |
3559 matches.clear() | 3557 matches.clear() |