# HG changeset patch # User Martin von Zweigbergk # Date 1547838630 28800 # Node ID 609d6d8646dbc95025bc8d9381ab37b27520f079 # Parent b44f1703b28c5a1f012e41ca1f596be3781ffa35 grep: use set instead of dict with dummy value Differential Revision: https://phab.mercurial-scm.org/D5633 diff -r b44f1703b28c -r 609d6d8646db mercurial/commands.py --- a/mercurial/commands.py Thu Sep 06 15:56:53 2018 -0700 +++ b/mercurial/commands.py Fri Jan 18 11:10:30 2019 -0800 @@ -2925,7 +2925,7 @@ fm.data(matched=False) fm.end() - skip = {} + skip = set() revfiles = {} match = scmutil.match(repo[None], pats, opts) found = False @@ -2954,7 +2954,7 @@ if copy: copies.setdefault(rev, {})[fn] = copy if fn in skip: - skip[copy] = True + skip.add(copy) if fn in skip: continue files.append(fn) @@ -2984,16 +2984,16 @@ copy = copies.get(rev, {}).get(fn) if fn in skip: if copy: - skip[copy] = True + skip.add(copy) continue pstates = matches.get(parent, {}).get(copy or fn, []) if pstates or states: r = display(fm, fn, ctx, pstates, states) found = found or r if r and not diff and not all_files: - skip[fn] = True + skip.add(fn) if copy: - skip[copy] = True + skip.add(copy) del revfiles[rev] # We will keep the matches dict for the duration of the window # clear the matches dict once the window is over