test-merge-prompt.t: add tests for linear updates + change/delete conflicts
authorSiddharth Agarwal <sid0@fb.com>
Mon, 02 Nov 2015 12:25:15 -0800
changeset 26850 00209e38e7d9
parent 26849 a6eb4e481134
child 26851 859f453e8b4e
test-merge-prompt.t: add tests for linear updates + change/delete conflicts Turns out this bit of code was woefully untested.
tests/test-merge-prompt.t
--- a/tests/test-merge-prompt.t	Sat Oct 24 16:25:16 2015 -0700
+++ b/tests/test-merge-prompt.t	Mon Nov 02 12:25:15 2015 -0800
@@ -148,3 +148,25 @@
   changed
   *** file2 does not exist
 
+Non-interactive linear update
+
+  $ hg co -C 0
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo changed >> file1
+  $ hg rm file2
+  $ hg update 1 -y
+  local changed file1 which remote deleted
+  use (c)hanged version or (d)elete? c
+  remote changed file2 which local deleted
+  use (c)hanged version or leave (d)eleted? c
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ status
+  --- status ---
+  A file1
+  C file2
+  --- file1 ---
+  1
+  changed
+  --- file2 ---
+  2
+  changed