##// END OF EJS Templates
windows: adjust PYTHONPATH update in test-status-color.t...
marmoute -
r53117:02da7e76 stable
parent child Browse files
Show More
@@ -1,407 +1,414
1 1 $ cat <<EOF >> $HGRCPATH
2 2 > [ui]
3 3 > color = always
4 4 > [color]
5 5 > mode = ansi
6 6 > EOF
7 7 Terminfo codes compatibility fix
8 8 $ echo "color.none=0" >> $HGRCPATH
9 9
10 10 $ hg init repo1
11 11 $ cd repo1
12 12 $ mkdir a b a/1 b/1 b/2
13 13 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
14 14
15 15 hg status in repo root:
16 16
17 17 $ hg status
18 18 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
19 19 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
20 20 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
21 21 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
22 22 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
23 23 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
24 24
25 25 $ hg status --color=debug
26 26 [status.unknown|? ][status.unknown|a/1/in_a_1]
27 27 [status.unknown|? ][status.unknown|a/in_a]
28 28 [status.unknown|? ][status.unknown|b/1/in_b_1]
29 29 [status.unknown|? ][status.unknown|b/2/in_b_2]
30 30 [status.unknown|? ][status.unknown|b/in_b]
31 31 [status.unknown|? ][status.unknown|in_root]
32 32 HGPLAIN disables color
33 33 $ HGPLAIN=1 hg status --color=debug
34 34 ? a/1/in_a_1 (glob)
35 35 ? a/in_a (glob)
36 36 ? b/1/in_b_1 (glob)
37 37 ? b/2/in_b_2 (glob)
38 38 ? b/in_b (glob)
39 39 ? in_root
40 40 HGPLAINEXCEPT=color does not disable color
41 41 $ HGPLAINEXCEPT=color hg status --color=debug
42 42 [status.unknown|? ][status.unknown|a/1/in_a_1] (glob)
43 43 [status.unknown|? ][status.unknown|a/in_a] (glob)
44 44 [status.unknown|? ][status.unknown|b/1/in_b_1] (glob)
45 45 [status.unknown|? ][status.unknown|b/2/in_b_2] (glob)
46 46 [status.unknown|? ][status.unknown|b/in_b] (glob)
47 47 [status.unknown|? ][status.unknown|in_root]
48 48
49 49 hg status with template
50 50 $ hg status -T "{label('red', path)}\n" --color=debug
51 51 [red|a/1/in_a_1]
52 52 [red|a/in_a]
53 53 [red|b/1/in_b_1]
54 54 [red|b/2/in_b_2]
55 55 [red|b/in_b]
56 56 [red|in_root]
57 57
58 58 hg status . in repo root:
59 59
60 60 $ hg status .
61 61 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
62 62 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
63 63 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
64 64 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
65 65 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
66 66 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
67 67
68 68 $ hg status --cwd a
69 69 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
70 70 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
71 71 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
72 72 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
73 73 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
74 74 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
75 75 $ hg status --cwd a .
76 76 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc)
77 77 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc)
78 78 $ hg status --cwd a ..
79 79 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc)
80 80 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc)
81 81 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc)
82 82 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc)
83 83 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc)
84 84 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc)
85 85
86 86 $ hg status --cwd b
87 87 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
88 88 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
89 89 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
90 90 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
91 91 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
92 92 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
93 93 $ hg status --cwd b .
94 94 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc)
95 95 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc)
96 96 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc)
97 97 $ hg status --cwd b ..
98 98 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc)
99 99 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc)
100 100 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc)
101 101 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc)
102 102 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc)
103 103 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc)
104 104
105 105 $ hg status --cwd a/1
106 106 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
107 107 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
108 108 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
109 109 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
110 110 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
111 111 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
112 112 $ hg status --cwd a/1 .
113 113 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc)
114 114 $ hg status --cwd a/1 ..
115 115 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc)
116 116 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc)
117 117
118 118 $ hg status --cwd b/1
119 119 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
120 120 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
121 121 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
122 122 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
123 123 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
124 124 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
125 125 $ hg status --cwd b/1 .
126 126 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc)
127 127 $ hg status --cwd b/1 ..
128 128 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc)
129 129 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc)
130 130 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc)
131 131
132 132 $ hg status --cwd b/2
133 133 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc)
134 134 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc)
135 135 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc)
136 136 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc)
137 137 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc)
138 138 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc)
139 139 $ hg status --cwd b/2 .
140 140 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc)
141 141 $ hg status --cwd b/2 ..
142 142 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc)
143 143 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc)
144 144 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc)
145 145
146 146 Make sure --color=never works
147 147 $ hg status --color=never
148 148 ? a/1/in_a_1
149 149 ? a/in_a
150 150 ? b/1/in_b_1
151 151 ? b/2/in_b_2
152 152 ? b/in_b
153 153 ? in_root
154 154
155 155 Make sure ui.formatted=False works
156 156 $ hg status --color=auto --config ui.formatted=False
157 157 ? a/1/in_a_1
158 158 ? a/in_a
159 159 ? b/1/in_b_1
160 160 ? b/2/in_b_2
161 161 ? b/in_b
162 162 ? in_root
163 163
164 164 $ cd ..
165 165
166 166 $ hg init repo2
167 167 $ cd repo2
168 168 $ touch modified removed deleted ignored
169 169 $ echo "^ignored$" > .hgignore
170 170 $ hg ci -A -m 'initial checkin'
171 171 \x1b[0;32madding .hgignore\x1b[0m (esc)
172 172 \x1b[0;32madding deleted\x1b[0m (esc)
173 173 \x1b[0;32madding modified\x1b[0m (esc)
174 174 \x1b[0;32madding removed\x1b[0m (esc)
175 175 $ hg log --color=debug
176 176 [log.changeset changeset.draft|changeset: 0:389aef86a55e]
177 177 [log.tag|tag: tip]
178 178 [log.user|user: test]
179 179 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
180 180 [log.summary|summary: initial checkin]
181 181
182 182 $ hg log -Tcompact --color=debug
183 183 [log.changeset changeset.draft|0][tip] [log.node|389aef86a55e] [log.date|1970-01-01 00:00 +0000] [log.user|test]
184 184 [ui.note log.description|initial checkin]
185 185
186 186 Labels on empty strings should not be displayed, labels on custom
187 187 templates should be.
188 188
189 189 $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}'
190 190 [my.label|test]
191 191 $ touch modified added unknown ignored
192 192 $ hg add added
193 193 $ hg remove removed
194 194 $ rm deleted
195 195
196 196 hg status:
197 197
198 198 $ hg status
199 199 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
200 200 \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
201 201 \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
202 202 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
203 203
204 204 hg status modified added removed deleted unknown never-existed ignored:
205 205
206 206 $ hg status modified added removed deleted unknown never-existed ignored
207 207 never-existed: * (glob)
208 208 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
209 209 \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
210 210 \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
211 211 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
212 212
213 213 $ hg copy modified copied
214 214
215 215 hg status -C:
216 216
217 217 $ hg status -C
218 218 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
219 219 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc)
220 220 \x1b[0;0m modified\x1b[0m (esc)
221 221 \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
222 222 \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
223 223 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
224 224
225 225 hg status -A:
226 226
227 227 $ hg status -A
228 228 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
229 229 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc)
230 230 \x1b[0;0m modified\x1b[0m (esc)
231 231 \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
232 232 \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
233 233 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
234 234 \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc)
235 235 \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc)
236 236 \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc)
237 237
238 238
239 239 hg status -A (with terminfo color):
240 240
241 241 #if tic
242 242
243 243 $ tic -o "$TESTTMP/terminfo" "$TESTDIR/hgterm.ti"
244 244 $ ln -s "$TESTTMP/terminfo" "$TESTTMP/terminfo.cdb"
245 245 $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo -A
246 246 \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc)
247 247 \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc)
248 248 \x1b[30m\x1b[30m modified\x1b[30m (esc)
249 249 \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc)
250 250 \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc)
251 251 \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc)
252 252 \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc)
253 253 \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc)
254 254 \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc)
255 255
256 256 The user can define effects with raw terminfo codes:
257 257
258 258 $ cat <<EOF >> $HGRCPATH
259 259 > # Completely bogus code for dim
260 260 > terminfo.dim = \E[88m
261 261 > # We can override what's in the terminfo database, too
262 262 > terminfo.bold = \E[2m
263 263 > EOF
264 264 $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --config color.status.clean=dim -A
265 265 \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2madded\x1b[30m (esc)
266 266 \x1b[30m\x1b[32m\x1b[2mA \x1b[30m\x1b[30m\x1b[32m\x1b[2mcopied\x1b[30m (esc)
267 267 \x1b[30m\x1b[30m modified\x1b[30m (esc)
268 268 \x1b[30m\x1b[31m\x1b[2mR \x1b[30m\x1b[30m\x1b[31m\x1b[2mremoved\x1b[30m (esc)
269 269 \x1b[30m\x1b[36m\x1b[2m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[2m\x1b[4mdeleted\x1b[30m (esc)
270 270 \x1b[30m\x1b[35m\x1b[2m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[2m\x1b[4munknown\x1b[30m (esc)
271 271 \x1b[30m\x1b[30m\x1b[2mI \x1b[30m\x1b[30m\x1b[30m\x1b[2mignored\x1b[30m (esc)
272 272 \x1b[30m\x1b[88mC \x1b[30m\x1b[30m\x1b[88m.hgignore\x1b[30m (esc)
273 273 \x1b[30m\x1b[88mC \x1b[30m\x1b[30m\x1b[88mmodified\x1b[30m (esc)
274 274
275 275 #endif
276 276
277 277
278 278 $ echo "^ignoreddir$" > .hgignore
279 279 $ mkdir ignoreddir
280 280 $ touch ignoreddir/file
281 281
282 282 hg status ignoreddir/file:
283 283
284 284 $ hg status ignoreddir/file
285 285
286 286 hg status -i ignoreddir/file:
287 287
288 288 $ hg status -i ignoreddir/file
289 289 \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc)
290 290 $ cd ..
291 291
292 292 check 'status -q' and some combinations
293 293
294 294 $ hg init repo3
295 295 $ cd repo3
296 296 $ touch modified removed deleted ignored
297 297 $ echo "^ignored$" > .hgignore
298 298 $ hg commit -A -m 'initial checkin'
299 299 \x1b[0;32madding .hgignore\x1b[0m (esc)
300 300 \x1b[0;32madding deleted\x1b[0m (esc)
301 301 \x1b[0;32madding modified\x1b[0m (esc)
302 302 \x1b[0;32madding removed\x1b[0m (esc)
303 303 $ touch added unknown ignored
304 304 $ hg add added
305 305 $ echo "test" >> modified
306 306 $ hg remove removed
307 307 $ rm deleted
308 308 $ hg copy modified copied
309 309
310 310 test unknown color
311 311
312 312 $ hg --config color.status.modified=periwinkle status
313 313 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
314 314 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) (no-rhg !)
315 315 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) (no-rhg !)
316 316 M modified
317 317 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc)
318 318 \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc)
319 319 \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc)
320 320 \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc)
321 321 \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc)
322 322
323 323 Run status with 2 different flags.
324 324 Check if result is the same or different.
325 325 If result is not as expected, raise error
326 326
327 327 $ assert() {
328 328 > hg status $1 > ../a
329 329 > hg status $2 > ../b
330 330 > if diff ../a ../b > /dev/null; then
331 331 > out=0
332 332 > else
333 333 > out=1
334 334 > fi
335 335 > if [ $3 -eq 0 ]; then
336 336 > df="same"
337 337 > else
338 338 > df="different"
339 339 > fi
340 340 > if [ $out -ne $3 ]; then
341 341 > echo "Error on $1 and $2, should be $df."
342 342 > fi
343 343 > }
344 344
345 345 assert flag1 flag2 [0-same | 1-different]
346 346
347 347 $ assert "-q" "-mard" 0
348 348 $ assert "-A" "-marduicC" 0
349 349 $ assert "-qA" "-mardcC" 0
350 350 $ assert "-qAui" "-A" 0
351 351 $ assert "-qAu" "-marducC" 0
352 352 $ assert "-qAi" "-mardicC" 0
353 353 $ assert "-qu" "-u" 0
354 354 $ assert "-q" "-u" 1
355 355 $ assert "-m" "-a" 1
356 356 $ assert "-r" "-d" 1
357 357 $ cd ..
358 358
359 359 test 'resolve -l'
360 360
361 361 $ hg init repo4
362 362 $ cd repo4
363 363 $ echo "file a" > a
364 364 $ echo "file b" > b
365 365 $ hg add a b
366 366 $ hg commit -m "initial"
367 367 $ echo "file a change 1" > a
368 368 $ echo "file b change 1" > b
369 369 $ hg commit -m "head 1"
370 370 $ hg update 0
371 371 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
372 372 $ echo "file a change 2" > a
373 373 $ echo "file b change 2" > b
374 374 $ hg commit -m "head 2"
375 375 created new head
376 376 $ hg merge
377 377 merging a
378 378 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
379 379 merging b
380 380 warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
381 381 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
382 382 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
383 383 [1]
384 384 $ hg resolve -m b
385 385
386 386 hg resolve with one unresolved, one resolved:
387 387
388 388 $ hg resolve -l
389 389 \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc)
390 390 \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc)
391 391
392 392 color coding of error message with current availability of curses
393 393
394 394 $ hg unknowncommand > /dev/null
395 395 hg: unknown command 'unknowncommand'
396 396 (use 'hg help' for a list of commands)
397 397 [10]
398 398
399 399 color coding of error message without curses
400 400
401 401 $ echo 'raise ImportError' > curses.py
402 #if windows
403 $ PYTHONPATH="`pwd`;$PYTHONPATH" hg unknowncommand > /dev/null
404 hg: unknown command 'unknowncommand'
405 (use 'hg help' for a list of commands)
406 [10]
407 #else
402 408 $ PYTHONPATH=`pwd`:$PYTHONPATH hg unknowncommand > /dev/null
403 409 hg: unknown command 'unknowncommand'
404 410 (use 'hg help' for a list of commands)
405 411 [10]
412 #endif
406 413
407 414 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now