adds a diff flag, which works exactly same as all, infact since
-all searches diffs, there diff is a better name for it.
The all flag is still here for backward compatibility reasons.
Some major tests for all has been picked and added for diff.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG7fbb5d76c555: grep: add --diff flag
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
mercurial/commands.py | ||
---|---|---|
2394 | We definitely need better help text here to mention that it looks at the diff not all the content. | |
2424 | To deprecate a flag, we need to add (DEPRECATED) after the help text of the flag. Look for DEPRECATED, EXPERIMENTAL, ADVANCED in commands.py, you will find examples. Also, I suggest you to make a separate patch for deprecating the flag. | |
2533 | nit: it will be better if we can initialize a variable and store opts.get('all') and opts.get('diff') in it and reuse that. |
Queued, thanks.
Can you send a follow-up to deprecate the --all option?
It doesn't make sense to provide both --all and --diff in user help.
[('0', 'print0', None, _('end fields with NUL')), ('', 'all', None, _('print all revisions that match')),+ ('', 'diff', None, _('print all revisions when the term was introduced or removed')),
Next time, please make sure test-check-* pass.
We definitely need better help text here to mention that it looks at the diff not all the content.