D3826: grep: change default behaviour of grep

2018-07-10 Thread sangeet259 (Sangeet Kumar Mishra)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9ef10437bb88: grep: change default behaviour to search working directory files (BC) (authored by sangeet259, committed by ). CHANGED PRIOR TO COMMIT

Re: D3826: grep: change default behaviour of grep

2018-07-10 Thread Yuya Nishihara
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

D3826: grep: change default behaviour of grep

2018-07-10 Thread yuja (Yuya Nishihara)
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 > -

D3826: grep: change default behaviour of grep

2018-07-10 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9492. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9482=9492 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-09 Thread durin42 (Augie Fackler)
durin42 requested changes to this revision. durin42 added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > commands.py:2518 > > By default, grep prints the most recent revision number for each > file in which it finds a match. To get it to print every

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9482. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9481=9482 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9481. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9480=9481 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9480. sangeet259 edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9474=9480 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py

D3826: grep: change default behaviour of grep

2018-07-09 Thread yuja (Yuya Nishihara)
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

Re: D3826: grep: change default behaviour of grep

2018-07-09 Thread Yuya Nishihara
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

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9474. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9473=9474 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9473. sangeet259 edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9472=9473 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py

D3826: grep: change default behaviour of grep

2018-07-09 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9472. sangeet259 edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9470=9472 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py

D3826: grep: change default behaviour of grep

2018-07-07 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9470. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9462=9470 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-06 Thread yuja (Yuya Nishihara)
yuja added a comment. > +if not opts.get('rev'): > +opts.get('rev').append("wdir()") > +opts['allfiles'] = True So, this breaks `hg grep --diff|--all`? And this is a behavior change. We should at least document how we can get back the original behavior.

Re: D3826: grep: change default behaviour of grep

2018-07-06 Thread Yuya Nishihara
> +if not opts.get('rev'): > +opts.get('rev').append("wdir()") > +opts['allfiles'] = True So, this breaks `hg grep --diff|--all`? And this is a behavior change. We should at least document how we can get back the original behavior.

D3826: grep: change default behaviour of grep

2018-07-05 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9462. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9461=9462 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep: change default behaviour of grep

2018-07-05 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9461. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9252=9461 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

Re: D3826: grep : change default behaviour of grep

2018-06-23 Thread Yuya Nishihara
> @@ -2431,6 +2431,10 @@ > Returns 0 if a match is found, 1 otherwise. > """ > opts = pycompat.byteskwargs(opts) > + > +if len(opts.get('rev')) ==1: > +opts['allfiles'] = True So, `-rA` implies `--allfiles` but `-rA -rB` doesn't? which seems worse than the current

D3826: grep: change default behaviour of grep

2018-06-23 Thread yuja (Yuya Nishihara)
yuja added a comment. > @@ -2431,6 +2431,10 @@ > > Returns 0 if a match is found, 1 otherwise. > """ > opts = pycompat.byteskwargs(opts) > > + > +if len(opts.get('rev')) ==1: > +opts['allfiles'] = True So, `-rA` implies `--allfiles` but `-rA -rB`

D3826: grep: change default behaviour of grep

2018-06-21 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 added a comment. I need some help with the tests failing here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3826 To: sangeet259, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list

D3826: grep : change default behaviour of grep

2018-06-21 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 9252. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3826?vs=9251=9252 REVISION DETAIL https://phab.mercurial-scm.org/D3826 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

D3826: grep : change default behaviour of grep

2018-06-21 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY with this patch grep searches on the working directory by default and looks for all files tracked by the working directory and greps on them REPOSITORY rHG