tests: add test of `hg next --evolve` with dirty working directory stable
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 03 Jun 2018 02:24:28 +0530
branchstable
changeset 3778 1bf0d353f999
parent 3777 d8f8067f742c
child 3779 084038b98cd7
tests: add test of `hg next --evolve` with dirty working directory I was testing some output change to `hg next --evolve` in dirty working directory and found that we don't have any test for that.
tests/test-prev-next.t
--- a/tests/test-prev-next.t	Sun Jun 03 03:35:22 2018 +0530
+++ b/tests/test-prev-next.t	Sun Jun 03 02:24:28 2018 +0530
@@ -354,3 +354,26 @@
   atop:[3] one
   working directory now at a7d885c75614
   $ wait
+
+testing next --evolve when working directory is dirty
+
+  $ hg log -GT "{rev}:{node|short} {desc|firstline}"
+  @  4:a7d885c75614 two
+  |
+  o  3:c741983992fc one
+  
+
+  $ hg up .^
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ echo foobar > bar
+  $ hg add bar
+  $ hg amend
+  1 new orphan changesets
+
+  $ echo babar > bar
+
+  $ hg next --evolve
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]