diff tests/test-prev-next.t @ 3780:9da11755d615 stable

tests: add test demonstrating issue5808 This patch adds test showing that `next` and `prev` does not respect the `commands.update.check` config option, particularly when set to `noconflict`.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 03 Jun 2018 02:50:55 +0530
parents 084038b98cd7
children e73a73b27f3e
line wrap: on
line diff
--- a/tests/test-prev-next.t	Sun Jun 03 02:26:19 2018 +0530
+++ b/tests/test-prev-next.t	Sun Jun 03 02:50:55 2018 +0530
@@ -376,3 +376,52 @@
   $ hg next --evolve
   abort: uncommitted changes
   [255]
+
+  $ cd ..
+
+Testing that `next` and `prev` respects `commands.update.check=noconflict`
+
+  $ hg init noconflict
+  $ cd noconflict
+  $ echo "[commands]" >> .hg/hgrc
+  $ echo "update.check=noconflict" >> .hg/hgrc
+
+  $ echo hi > wat
+  $ hg ci -Aqm "added wat"
+  $ echo hi > foo
+  $ hg ci -Aqm "added foo"
+  $ echo hi > bar
+  $ hg ci -Aqm "added bar"
+
+testing for `hg prev`
+
+  $ echo bar > wat
+  $ hg prev
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]
+  $ hg diff
+  diff -r ac3de1218820 wat
+  --- a/wat	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/wat	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +1,1 @@
+  -hi
+  +bar
+
+testing for `hg next`
+
+  $ echo hi > wat
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo bar > wat
+  $ hg next
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]
+  $ hg diff
+  diff -r cf959ce4e1ff wat
+  --- a/wat	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/wat	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +1,1 @@
+  -hi
+  +bar