changeset 4240:323b3dac5bba

next: improve the message for dirty working copy with --evolve This will be important soon when --evolve will be the default.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 10 Nov 2018 16:05:34 +0100
parents 7e274734cc2c
children df22f010cf24
files hgext3rd/evolve/__init__.py tests/test-prev-next.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Sat Nov 10 16:01:31 2018 +0100
+++ b/hgext3rd/evolve/__init__.py	Sat Nov 10 16:05:34 2018 +0100
@@ -1130,7 +1130,8 @@
 
         # check for dirty wdir if --evolve is passed
         if opts['evolve']:
-            cmdutil.bailifchanged(repo)
+            hint = _('use `hg amend`, `hg revert` or `hg shelve`')
+            cmdutil.bailifchanged(repo, hint=hint)
 
         children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()]
         topic = _getcurrenttopic(repo)
--- a/tests/test-prev-next.t	Sat Nov 10 16:01:31 2018 +0100
+++ b/tests/test-prev-next.t	Sat Nov 10 16:05:34 2018 +0100
@@ -375,6 +375,7 @@
 
   $ hg next --evolve
   abort: uncommitted changes
+  (use `hg amend`, `hg revert` or `hg shelve`)
   [255]
 
   $ cd ..