diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2710,10 +2710,10 @@ ) @command('grep', - [('0', 'print0', None, _('end fields with NUL')), + [('', 'diff', None, _('print all revisions when the term was introduced ' + 'or removed')), + ('0', 'print0', None, _('end fields with NUL')), ('', 'all', None, _('print all revisions that match (DEPRECATED) ')), - ('', 'diff', None, _('print all revisions when the term was introduced ' - 'or removed')), ('a', 'text', None, _('treat all files as text')), ('f', 'follow', None, _('follow changeset history,' diff --git a/tests/test-completion.t b/tests/test-completion.t --- a/tests/test-completion.t +++ b/tests/test-completion.t @@ -326,7 +326,7 @@ files: rev, print0, include, exclude, template, subrepos forget: interactive, include, exclude, dry-run graft: rev, base, continue, stop, abort, edit, log, no-commit, force, currentdate, currentuser, date, user, tool, dry-run - grep: print0, all, diff, text, follow, ignore-case, files-with-matches, line-number, rev, all-files, user, date, template, include, exclude + grep: diff, print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, all-files, user, date, template, include, exclude heads: rev, topo, active, closed, style, template help: extension, command, keyword, system identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, template