D3976: grep: add MULTIREV support to --allfiles flag
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Mon Aug 6 09:24:12 EDT 2018
yuja added a comment.
Looks mostly good. One nit.
> @@ -2748,7 +2749,7 @@
>
> for fn in sorted(revfiles.get(rev, [])):
> states = matches[rev][fn]
> copy = copies.get(rev, {}).get(fn)
>
> - if fn in skip: + if fn in skip and not all_files: if copy: skip[copy] = True continue
Instead of ignoring `skip[fn]`, it's probably better to not set `skip[fn]`
at all. That's what we do at a couple of lines below, `if r and not diff`.
> @@ -1983,6 +1980,7 @@
>
> it = iter(revs)
> stopiteration = False
>
> +
>
> for windowsize in increasingwindows():
> nrevs = []
> for i in xrange(windowsize):
>
> @@ -1997,14 +1995,18 @@
>
> ctx = change(rev)
> if not fns:
> def fns_generator():
>
> +
>
> if allfiles:
> fiter = iter(ctx)
> else:
>
> - fiter = ctx.files() + fiter = iter(ctx.files()) for f in fiter: if match(f): yield f + + fns = fns_generator() +
Can you undo these unrelated changes?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3976
To: sangeet259, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list