##// END OF EJS Templates
grep: use set instead of dict with dummy value...
Martin von Zweigbergk -
r41413:609d6d86 default
parent child Browse files
Show More
@@ -2925,7 +2925,7 b' def grep(ui, repo, pattern, *pats, **opt'
2925 2925 fm.data(matched=False)
2926 2926 fm.end()
2927 2927
2928 skip = {}
2928 skip = set()
2929 2929 revfiles = {}
2930 2930 match = scmutil.match(repo[None], pats, opts)
2931 2931 found = False
@@ -2954,7 +2954,7 b' def grep(ui, repo, pattern, *pats, **opt'
2954 2954 if copy:
2955 2955 copies.setdefault(rev, {})[fn] = copy
2956 2956 if fn in skip:
2957 skip[copy] = True
2957 skip.add(copy)
2958 2958 if fn in skip:
2959 2959 continue
2960 2960 files.append(fn)
@@ -2984,16 +2984,16 b' def grep(ui, repo, pattern, *pats, **opt'
2984 2984 copy = copies.get(rev, {}).get(fn)
2985 2985 if fn in skip:
2986 2986 if copy:
2987 skip[copy] = True
2987 skip.add(copy)
2988 2988 continue
2989 2989 pstates = matches.get(parent, {}).get(copy or fn, [])
2990 2990 if pstates or states:
2991 2991 r = display(fm, fn, ctx, pstates, states)
2992 2992 found = found or r
2993 2993 if r and not diff and not all_files:
2994 skip[fn] = True
2994 skip.add(fn)
2995 2995 if copy:
2996 skip[copy] = True
2996 skip.add(copy)
2997 2997 del revfiles[rev]
2998 2998 # We will keep the matches dict for the duration of the window
2999 2999 # clear the matches dict once the window is over
General Comments 0
You need to be logged in to leave comments. Login now