tests/test-prev-next.t
branchmercurial-4.7
changeset 4512 7a779a288793
parent 4359 2cbb9914d227
parent 4476 f0bda6a6d93b
child 4516 f54bb6eaf5e6
child 4672 653c42af172e
--- a/tests/test-prev-next.t	Tue Jan 22 12:54:43 2019 -0500
+++ b/tests/test-prev-next.t	Thu Apr 11 22:41:41 2019 +0200
@@ -213,13 +213,13 @@
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [3] added b (2)
   $ hg next <<EOF
-  > 1
+  > 2
   > EOF
   ambiguous next changeset, choose one to update:
-  0: [e3b6d5df389b] added c
-  1: [9df671ccd2c7] added d
+  1: [e3b6d5df389b] added c
+  2: [9df671ccd2c7] added d
   q: quit the prompt
-  enter the index of the revision you want to select: 1
+  enter the index of the revision you want to select: 2
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [5] added d
 
@@ -236,13 +236,13 @@
   (2 unstable changesets to be evolved here, do you want --evolve?)
   [1]
   $ hg next --evolve <<EOF
-  > 0
+  > 1
   > EOF
   ambiguous next (unstable) changeset, choose one to evolve and update:
-  0: [e3b6d5df389b] added c
-  1: [9df671ccd2c7] added d
+  1: [e3b6d5df389b] added c
+  2: [9df671ccd2c7] added d
   q: quit the prompt
-  enter the index of the revision you want to select: 0
+  enter the index of the revision you want to select: 1
   move:[4] added c
   atop:[6] added b (3)
   working directory now at 5ce67c2407b0
@@ -284,8 +284,8 @@
   > q
   > EOF
   multiple parents, choose one to update:
-  0: [47ea25be8aea] added d
-  1: [5ce67c2407b0] added c
+  1: [47ea25be8aea] added d
+  2: [5ce67c2407b0] added c
   q: quit the prompt
   enter the index of the revision you want to select: q
   [8] added d
@@ -300,13 +300,13 @@
   [1]
 
   $ hg prev <<EOF
-  > 1
+  > 2
   > EOF
   multiple parents, choose one to update:
-  0: [47ea25be8aea] added d
-  1: [5ce67c2407b0] added c
+  1: [47ea25be8aea] added d
+  2: [5ce67c2407b0] added c
   q: quit the prompt
-  enter the index of the revision you want to select: 1
+  enter the index of the revision you want to select: 2
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [7] added c
 
@@ -339,7 +339,7 @@
   $ sleep 1
   $ hg prev
   waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
-  got lock after [4-6] seconds (re)
+  got lock after (\d+) seconds (re)
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [0] one
   $ wait
@@ -349,7 +349,7 @@
   $ hg next --evolve
   waiting for lock on working directory of $TESTTMP/repo held by process '*' on host '*' (glob)
   1 new orphan changesets
-  got lock after [4-6] seconds (re)
+  got lock after (\d+) seconds (re)
   move:[2] two
   atop:[3] one
   working directory now at a7d885c75614
@@ -443,9 +443,14 @@
 
 Test that --merge still works fine with commands.update.check set
 
-XXX: yes we want --merge and we passed that!
+  $ hg config commands.update.check
+  noconflict
   $ echo hi > bar
   $ echo bar >> bar
+  $ hg next
+  abort: conflicting changes
+  (do you want --merge?)
+  [255]
   $ hg next --merge
   merging bar
   warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')
@@ -459,7 +464,10 @@
 
 Testing --merge works with other values of commands.update.check also
 
-XXX: things are broken!
+  $ hg prev --config commands.update.check=abort
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]
   $ hg prev --merge --config commands.update.check=abort
   local [working copy] changed bar which other [destination] deleted
   use (c)hanged version, (d)elete, or leave (u)nresolved? 
@@ -476,6 +484,10 @@
   $ echo bar > bar
   $ hg add bar
 
+  $ hg next --config commands.update.check=abort
+  abort: uncommitted changes
+  (do you want --merge?)
+  [255]
   $ hg next --merge --config commands.update.check=abort
   merging bar
   warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')