D3826: grep: change default behaviour of grep

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue Jul 10 09:36:46 EDT 2018


yuja added a comment.


  Queued, thanks.
  
  >   $ hg up -q null
  > 
  > - $ hg grep -f port
  > - [1] +  $ hg grep -r tip:0 -f port
  
  I've changed this to `-r 'reverse(:.)'` since it was the default for `-f`.
  
  > - By default, grep prints the most recent revision number for each
  > - file in which it finds a match. To get it to print every revision
  > - that contains a change in match status ("-" for a match that becomes
  > - a non-match, or "+" for a non-match that becomes a match), use the
  > - --diff flag. +    By default, grep searches the expression on the working directory +    , to search history and show the most recent revision number for each +    file in which it finds a match, use `hg grep -r tip:0`. +    To get it to print every revision that contains a change in match status +    ("-" for a match that becomes a non-match, or "+" for a non-match that becomes +    a match), use the --diff flag.
  
  Perhaps this needs an English tweak, but I'm not a right person. So I only
  fixed trivial stuffs.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list