diff tests/test-uncommit.t @ 1143:160fd06312fc

uncommit: abort when rev specifies the current changeset The uncommit command now fails when the rev argument indicates the current changeset. Previously this aborted in the changeset obsolescence machinery when the current commit tries to obsolete itself. Using the rev argument like this indicates a misunderstanding, so printing an uncommit-specific error should make it easier to understand what went wrong.
author Nathan Goldbaum <ngoldbau@ucsc.edu>
date Tue, 28 Oct 2014 18:06:28 -0700
parents f355bbc124fc
children cc3e68120185
line wrap: on
line diff
--- a/tests/test-uncommit.t	Tue Oct 28 23:18:56 2014 -0400
+++ b/tests/test-uncommit.t	Tue Oct 28 18:06:28 2014 -0700
@@ -347,6 +347,9 @@
   $ hg cat b --rev 0
   b: no such file in rev 07f494440405
   [1]
+  $ hg uncommit --rev . b
+  abort: cannot uncommit to parent changeset
+  [255]
   $ hg uncommit --rev 0 b
   $ hg cat b --rev .
   b: no such file in rev 5b27f6b17da2