D3826: grep: change default behaviour of grep

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Mon Jul 9 08:23:17 EDT 2018


yuja added a comment.


  Looks mostly good. Can you rebase this onto the current tip and update the
  help?
  
  >   $ hg grep '.*'
  > 
  > - port:4:export
  > - port:4:vaportight
  > - port:4:import/export +  port:2147483647:export +  port:2147483647:vaportight +  port:2147483647:import/export
  
  [snip]
  
  It's probably better to leave the existing tests to test the old behavior
  by adding some arguments (maybe `-r tip:0`) unless we're sure that the new
  behavior covers things that should be tested.
  
  > +    if not opts.get('rev') and not diff:
  >  +        opts.get('rev').append("wdir()")
  
  Nit: If you want to care for missing `opts['rev']`, this should be
  `opts['rev'] = ["wdir()"]`.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list