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
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
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
> -
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
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
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
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
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
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
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
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
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
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
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
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.
> +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.
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
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
> @@ -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
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`
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
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
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
23 matches
Mail list logo