changeset 414:299af91b8b6e stable

evolve: tweak and add EOL to kill warning
author Patrick Mezard <patrick@mezard.eu>
date Fri, 03 Aug 2012 17:48:21 +0200
parents 598ff1df3b92
children ea7f2a4ad530
files hgext/evolve.py tests/test-evolve.t
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Mon Jul 30 22:45:06 2012 +0200
+++ b/hgext/evolve.py	Fri Aug 03 17:48:21 2012 +0200
@@ -359,7 +359,7 @@
             new = [node.nullid]
         for n in targetnodes:
             if not repo[n].mutable():
-                ui.warn(_("Can't kill immutable changeset %s") % repo[n])
+                ui.warn(_("cannot kill immutable changeset %s\n") % repo[n])
             else:
                 for ne in new:
                     repo.addobsolete(ne, n)
--- a/tests/test-evolve.t	Mon Jul 30 22:45:06 2012 +0200
+++ b/tests/test-evolve.t	Fri Aug 03 17:48:21 2012 +0200
@@ -54,6 +54,15 @@
   1 - 7c3bad9141dc add b (public)
   0 - 1f0dee641bb7 add a (public)
 
+test kill and immutable changeset
+
+  $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
+  1 public stable
+  $ hg kill 1
+  cannot kill immutable changeset 7c3bad9141dc
+  $ hg log -r 1 --template '{rev} {phase} {obsolete}\n'
+  1 public stable
+
 test simple kill
 
   $ hg id -n