next-prev: add tests showing --merge not respected in some cases stable
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 08 Jun 2018 18:32:48 +0530
branchstable
changeset 3812 25dfa95c37fd
parent 3793 3343c5491b31
child 3813 27e7ed2d13a6
next-prev: add tests showing --merge not respected in some cases This patch adds tests which show that --merge is not respected when you set commands.update.check to any value. This is a bug I wrote few days ago and will fix it in next changeset. I like this process of writing bugs and fixing them.
tests/test-prev-next.t
--- a/tests/test-prev-next.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-prev-next.t	Fri Jun 08 18:32:48 2018 +0530
@@ -439,3 +439,33 @@
   abort: conflicting changes
   (do you want --merge?)
   [255]
+
+Test that --merge still works fine with commands.update.check set
+
+XXX: yes we want --merge and we passed that!
+  $ echo hi > bar
+  $ echo bar >> bar
+  $ hg next --merge
+  abort: conflicting changes
+  (do you want --merge?)
+  [255]
+
+Testing --merge works with other values of commands.update.check also
+
+XXX: things are broken!
+  $ hg prev --merge --config commands.update.check=abort
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]
+
+  $ hg revert --all
+  forgetting bar
+  reverting wat
+
+  $ echo bar > bar
+  $ hg add bar
+
+  $ hg next --merge --config commands.update.check=abort
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]