graft: suggest the correct tool to continue (not graft)
Add test coverage for graft --continue without starting.
Suggest committing (or whatever the current activity is), via
wrongtooltocontinue which uses howtocontinue.
--- a/mercurial/commands.py Sun Feb 14 16:16:17 2016 +0000
+++ b/mercurial/commands.py Thu Feb 04 03:45:44 2016 +0000
@@ -3933,7 +3933,7 @@
except IOError as inst:
if inst.errno != errno.ENOENT:
raise
- raise error.Abort(_("no graft state found, can't continue"))
+ cmdutil.wrongtooltocontinue(repo, _('graft'))
else:
cmdutil.checkunfinished(repo)
cmdutil.bailifchanged(repo)
--- a/tests/test-graft.t Sun Feb 14 16:16:17 2016 +0000
+++ b/tests/test-graft.t Thu Feb 04 03:45:44 2016 +0000
@@ -46,6 +46,13 @@
|
o test@0.public: 0
+Can't continue without starting:
+
+ $ hg rm -q e
+ $ hg graft --continue
+ abort: no graft in progress
+ [255]
+ $ hg revert -r . -q e
Need to specify a rev: