continue: show a hint about how to resolve conflicted files

Summary:
"outstanding merge conflicts" is not a helpful message to inexperienced users.
Print out commands to get more context.

Reviewed By: simpkins

Differential Revision: D18535010

fbshipit-source-id: 035ec9f3d79bf04a997ee907469f2e3d749a1d0e
This commit is contained in:
Jun Wu 2019-11-22 19:27:58 -08:00 committed by Facebook Github Bot
parent e2322c1daf
commit ab6e41e651
2 changed files with 7 additions and 1 deletions

View File

@ -1910,7 +1910,12 @@ def continuecmd(ui, repo):
ui.status(_("(exiting merge state)\n"))
ms.reset()
else:
raise error.Abort(_("outstanding merge conflicts"))
raise error.Abort(
_("outstanding merge conflicts"),
hint=_(
"use 'hg resolve -l' to see a list of conflicted files, 'hg resolve -m' to mark files as resolved"
),
)
else:
raise error.Abort(_("nothing to continue"))

View File

@ -112,6 +112,7 @@ sh % "hg continue"
createstate(command="backout")
sh % "hg continue" == r"""
abort: outstanding merge conflicts
(use 'hg resolve -l' to see a list of conflicted files, 'hg resolve -m' to mark files as resolved)
[255]"""
sh % "hg resolve --all -t :local" == "(no more unresolved files)"
sh % "hg status" == r"""