D3728: grep: adds unmodified mode

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Jun 14 15:44:26 EDT 2018


pulkit added a comment.


  In https://phab.mercurial-scm.org/D3728#58540, @yuja wrote:
  
  > >> commands.py:2411
  > >  >       _('only search files changed within revision range'), _('REV')),
  > >  > +    ('', 'unmodified', False,
  > >  > +     _('include all files in the changeset while grepping')),
  > > 
  > > I wonder if `--allfiles` is a better name.  `--unmodified` makes me think unmodified files exclusively.
  > > 
  > > It's too bad `--all` is already used, because that would be consistent with the all files meaning in `status` and `revert`.  (Maybe others?)  The plan page mentions BCing plain grep into oblivion, and deprecating `--all`.  Is it worth a BC on this too, for consistency going forward?
  >
  > Maybe we can keep all new flags hidden as "(EXPERIMENTAL)" until we make
  >  the final BC? I don't think it's time for bikeshedding yet.
  
  
  I agree with Yuya and Matt both. How about renaming the flag to `--allfiles` and mark that as experimental. To mark a flag as experimental, append the help text with '(EXPERIMENTAL)'.

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