##// END OF EJS Templates
test-merge-prompt.t: unset HGMERGE...
Siddharth Agarwal -
r26895:fc41f9ff default
parent child Browse files
Show More
@@ -1,172 +1,175 b''
1 1 Test for
2 2 b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again
3 3 (issue897)
4 4
5 5 840e2b315c1f: Fix misleading error and prompts during update/merge
6 6 (issue556)
7 7
8 Make sure HGMERGE doesn't interfere with the test
9 $ unset HGMERGE
10
8 11 $ status() {
9 12 > echo "--- status ---"
10 13 > hg st -A file1 file2
11 14 > for file in file1 file2; do
12 15 > if [ -f $file ]; then
13 16 > echo "--- $file ---"
14 17 > cat $file
15 18 > else
16 19 > echo "*** $file does not exist"
17 20 > fi
18 21 > done
19 22 > }
20 23
21 24 $ hg init
22 25
23 26 $ echo 1 > file1
24 27 $ echo 2 > file2
25 28 $ hg ci -Am 'added file1 and file2'
26 29 adding file1
27 30 adding file2
28 31
29 32 $ hg rm file1
30 33 $ echo changed >> file2
31 34 $ hg ci -m 'removed file1, changed file2'
32 35
33 36 $ hg co 0
34 37 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 38
36 39 $ echo changed >> file1
37 40 $ hg rm file2
38 41 $ hg ci -m 'changed file1, removed file2'
39 42 created new head
40 43
41 44
42 45 Non-interactive merge:
43 46
44 47 $ hg merge -y
45 48 local changed file1 which remote deleted
46 49 use (c)hanged version or (d)elete? c
47 50 remote changed file2 which local deleted
48 51 use (c)hanged version or leave (d)eleted? c
49 52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 53 (branch merge, don't forget to commit)
51 54
52 55 $ status
53 56 --- status ---
54 57 M file2
55 58 C file1
56 59 --- file1 ---
57 60 1
58 61 changed
59 62 --- file2 ---
60 63 2
61 64 changed
62 65
63 66
64 67 Interactive merge:
65 68
66 69 $ hg co -C
67 70 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
68 71
69 72 $ hg merge --config ui.interactive=true <<EOF
70 73 > c
71 74 > d
72 75 > EOF
73 76 local changed file1 which remote deleted
74 77 use (c)hanged version or (d)elete? c
75 78 remote changed file2 which local deleted
76 79 use (c)hanged version or leave (d)eleted? d
77 80 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 81 (branch merge, don't forget to commit)
79 82
80 83 $ status
81 84 --- status ---
82 85 file2: * (glob)
83 86 C file1
84 87 --- file1 ---
85 88 1
86 89 changed
87 90 *** file2 does not exist
88 91
89 92
90 93 Interactive merge with bad input:
91 94
92 95 $ hg co -C
93 96 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 97
95 98 $ hg merge --config ui.interactive=true <<EOF
96 99 > foo
97 100 > bar
98 101 > d
99 102 > baz
100 103 > c
101 104 > EOF
102 105 local changed file1 which remote deleted
103 106 use (c)hanged version or (d)elete? foo
104 107 unrecognized response
105 108 local changed file1 which remote deleted
106 109 use (c)hanged version or (d)elete? bar
107 110 unrecognized response
108 111 local changed file1 which remote deleted
109 112 use (c)hanged version or (d)elete? d
110 113 remote changed file2 which local deleted
111 114 use (c)hanged version or leave (d)eleted? baz
112 115 unrecognized response
113 116 remote changed file2 which local deleted
114 117 use (c)hanged version or leave (d)eleted? c
115 118 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
116 119 (branch merge, don't forget to commit)
117 120
118 121 $ status
119 122 --- status ---
120 123 M file2
121 124 R file1
122 125 *** file1 does not exist
123 126 --- file2 ---
124 127 2
125 128 changed
126 129
127 130
128 131 Interactive merge with not enough input:
129 132
130 133 $ hg co -C
131 134 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 135
133 136 $ hg merge --config ui.interactive=true <<EOF
134 137 > d
135 138 > EOF
136 139 local changed file1 which remote deleted
137 140 use (c)hanged version or (d)elete? d
138 141 remote changed file2 which local deleted
139 142 use (c)hanged version or leave (d)eleted? abort: response expected
140 143 [255]
141 144
142 145 $ status
143 146 --- status ---
144 147 file2: * (glob)
145 148 C file1
146 149 --- file1 ---
147 150 1
148 151 changed
149 152 *** file2 does not exist
150 153
151 154 Non-interactive linear update
152 155
153 156 $ hg co -C 0
154 157 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
155 158 $ echo changed >> file1
156 159 $ hg rm file2
157 160 $ hg update 1 -y
158 161 local changed file1 which remote deleted
159 162 use (c)hanged version or (d)elete? c
160 163 remote changed file2 which local deleted
161 164 use (c)hanged version or leave (d)eleted? c
162 165 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 166 $ status
164 167 --- status ---
165 168 A file1
166 169 C file2
167 170 --- file1 ---
168 171 1
169 172 changed
170 173 --- file2 ---
171 174 2
172 175 changed
General Comments 0
You need to be logged in to leave comments. Login now