resolve: report no argument warning using a hint

With this change resolve and revert produce consistent output when run with no
arguments:

$ hg resolve
abort: no files or directories specified
(use --all to remerge all files)

$ hg revert
abort: no files or directories specified
(use --all to revert all files)
This commit is contained in:
Nathan Goldbaum 2014-07-24 14:29:08 -07:00
parent 27315bd014
commit 46f5e72040
2 changed files with 4 additions and 3 deletions

View File

@ -4994,8 +4994,8 @@ def resolve(ui, repo, *pats, **opts):
if pats and all:
raise util.Abort(_("can't specify --all and patterns"))
if not (all or pats or show or mark or unmark):
raise util.Abort(_('no files or directories specified; '
'use --all to remerge all files'))
raise util.Abort(_('no files or directories specified'),
hint=('use --all to remerge all files'))
wlock = repo.wlock()
try:

View File

@ -76,7 +76,8 @@ after resolve
resolve all warning
$ hg resolve
abort: no files or directories specified; use --all to remerge all files
abort: no files or directories specified
(use --all to remerge all files)
[255]
resolve all