Patchwork [4,of,5] test-merge-prompt.t: add tests for linear updates + change/delete conflicts

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 2, 2015, 8:26 p.m.
Message ID <a61553db98c038aba120.1446495993@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11264/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 2, 2015, 8:26 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1446495915 28800
#      Mon Nov 02 12:25:15 2015 -0800
# Branch stable
# Node ID a61553db98c038aba120a535e0edff65960836a5
# Parent  7e88113e98c32a7e1eb39e1a13a843f34bd7142e
test-merge-prompt.t: add tests for linear updates + change/delete conflicts

Turns out this bit of code was woefully untested.

Patch

diff --git a/tests/test-merge-prompt.t b/tests/test-merge-prompt.t
--- a/tests/test-merge-prompt.t
+++ b/tests/test-merge-prompt.t
@@ -148,3 +148,25 @@  Interactive merge with not enough input:
   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