D3728: grep: adds unmodified mode

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Jun 16 09:17:50 EDT 2018


yuja added a comment.


  > +    allfiles = opts.get('allfiles')
  > 
  >   follow = opts.get('follow') or opts.get('follow_first')
  >   revs = _walkrevs(repo, opts)
  >   if not revs:
  > 
  > @@ -1990,7 +1991,11 @@
  > 
  >   ctx = change(rev)
  >   if not fns:
  >       def fns_generator():
  > 
  > - for f in ctx.files(): +                        if allfiles and len(revs) == 1:
  
  Can you make it error out if len(revs) > 1 isn't supported?
  For example,
  
    allfiles = opts.get('allfiles')
    follow = opts.get('follow') or opts.get('follow_first')
    revs = _walkrevs(repo, opts)
    if allfiles and len(revs) > 1:
        raise error.Abort(_(...))  # or ProgrammingError if that never happens

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3728

To: sangeet259, #hg-reviewers
Cc: pulkit, yuja, mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list