##// END OF EJS Templates
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich -
r12943:7439ea41 stable
parent child Browse files
Show More
@@ -117,11 +117,11 b' Unfortunately, non-conflicting changes, '
117 "c" file in p1.1 patch are reverted too.
117 "c" file in p1.1 patch are reverted too.
118 Just to say that manifest not listing "c" here is a bug.
118 Just to say that manifest not listing "c" here is a bug.
119
119
120 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6 | "$TESTDIR"/printrepr.py
120 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6
121 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h
121 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h (esc)
122 |
122 |
123 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5 | "$TESTDIR"/printrepr.py
123 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5
124 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g
124 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g (esc)
125 |
125 |
126 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
126 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
127 |
127 |
@@ -128,8 +128,8 b' Convert while testing all possible outpu'
128
128
129 Check tags are in UTF-8
129 Check tags are in UTF-8
130
130
131 $ python -c "print '\n'.join([('%r' % l) for l in file('.hgtags', 'rb').readlines()])"
131 $ cat .hgtags
132 '221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e\n'
132 221c3fdaf24df5f14c0a64c597581e2eacfb47bb branch\xc3\xa9e (esc)
133 '7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9\n'
133 7a40952c2db29cf00d9e31df3749e98d8a4bdcbf branch\xc3\xa9 (esc)
134
134
135 $ cd ..
135 $ cd ..
@@ -48,7 +48,7 b' Test adding .hgeol'
48 > echo '% hg status'
48 > echo '% hg status'
49 > hg status
49 > hg status
50 > echo '% hg tip -p'
50 > echo '% hg tip -p'
51 > hg tip -p | python $TESTDIR/printrepr.py
51 > hg tip -p
52 > cd ..
52 > cd ..
53 > rm -r repo-$1
53 > rm -r repo-$1
54 > }
54 > }
@@ -118,8 +118,8 b' Test adding .hgeol'
118 -first
118 -first
119 -second
119 -second
120 -third
120 -third
121 +first\r
121 +first\r (esc)
122 +second\r
122 +second\r (esc)
123 +third\r
123 +third\r (esc)
124
124
125 $ rm -r repo
125 $ rm -r repo
@@ -31,11 +31,11 b' Clone'
31 updating to branch default
31 updating to branch default
32 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 $ cd repo-2
33 $ cd repo-2
34 $ python $TESTDIR/printrepr.py < a.txt
34 $ cat a.txt
35 first\r
35 first\r (esc)
36 second\r
36 second\r (esc)
37 third\r
37 third\r (esc)
38 $ hg cat a.txt | python $TESTDIR/printrepr.py
38 $ hg cat a.txt
39 first
39 first
40 second
40 second
41 third
41 third
@@ -51,7 +51,7 b' Test clone of repo with .hgeol in workin'
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
52 $ cd repo-3
52 $ cd repo-3
53
53
54 $ python $TESTDIR/printrepr.py < a.txt
54 $ cat a.txt
55 first
55 first
56 second
56 second
57 third
57 third
@@ -71,7 +71,7 b' Test clone of revision with .hgeol'
71 [patterns]
71 [patterns]
72 **.txt = native
72 **.txt = native
73
73
74 $ python $TESTDIR/printrepr.py < a.txt
74 $ cat a.txt
75 first\r
75 first\r (esc)
76 second\r
76 second\r (esc)
77 third\r
77 third\r (esc)
@@ -50,30 +50,30 b' Set up helpers'
50 > native = $1
50 > native = $1
51 > EOF
51 > EOF
52 > hg update
52 > hg update
53 > echo '% printrepr.py native.txt'
53 > echo '% native.txt'
54 > python $TESTDIR/printrepr.py < native.txt
54 > cat native.txt
55 > echo '% printrepr.py unix.txt'
55 > echo '% unix.txt'
56 > python $TESTDIR/printrepr.py < unix.txt
56 > cat unix.txt
57 > echo '% printrepr.py win.txt'
57 > echo '% win.txt'
58 > python $TESTDIR/printrepr.py < win.txt
58 > cat win.txt
59 > printf "first${EOL}third${EOL}" > native.txt
59 > printf "first${EOL}third${EOL}" > native.txt
60 > printf "first\r\nthird\r\n" > win.txt
60 > printf "first\r\nthird\r\n" > win.txt
61 > printf "first\nthird\n" > unix.txt
61 > printf "first\nthird\n" > unix.txt
62 > echo '% hg diff'
62 > echo '% hg diff'
63 > hg diff > p
63 > hg diff > p
64 > python $TESTDIR/printrepr.py < p
64 > cat p
65 > echo '% hg revert'
65 > echo '% hg revert'
66 > hg revert --all
66 > hg revert --all
67 > echo '% hg import'
67 > echo '% hg import'
68 > hg import -m 'patch' p
68 > hg import -m 'patch' p
69 > echo '% printrepr.py native.txt'
69 > echo '% native.txt'
70 > python $TESTDIR/printrepr.py < native.txt
70 > cat native.txt
71 > echo '% printrepr.py unix.txt'
71 > echo '% unix.txt'
72 > python $TESTDIR/printrepr.py < unix.txt
72 > cat unix.txt
73 > echo '% printrepr.py win.txt'
73 > echo '% win.txt'
74 > python $TESTDIR/printrepr.py < win.txt
74 > cat win.txt
75 > echo '% hg diff -c tip'
75 > echo '% hg diff -c tip'
76 > hg diff -c tip | python $TESTDIR/printrepr.py
76 > hg diff -c tip
77 > cd ..
77 > cd ..
78 > rm -r repo-$1
78 > rm -r repo-$1
79 > }
79 > }
@@ -92,18 +92,18 b' Run tests'
92
92
93 % hg clone repo repo-LF
93 % hg clone repo repo-LF
94 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
95 % printrepr.py native.txt
95 % native.txt
96 first
96 first
97 second
97 second
98 third
98 third
99 % printrepr.py unix.txt
99 % unix.txt
100 first
100 first
101 second
101 second
102 third
102 third
103 % printrepr.py win.txt
103 % win.txt
104 first\r
104 first\r (esc)
105 second\r
105 second\r (esc)
106 third\r
106 third\r (esc)
107 % hg diff
107 % hg diff
108 diff --git a/native.txt b/native.txt
108 diff --git a/native.txt b/native.txt
109 --- a/native.txt
109 --- a/native.txt
@@ -123,24 +123,24 b' Run tests'
123 --- a/win.txt
123 --- a/win.txt
124 +++ b/win.txt
124 +++ b/win.txt
125 @@ -1,3 +1,2 @@
125 @@ -1,3 +1,2 @@
126 first\r
126 first\r (esc)
127 -second\r
127 -second\r (esc)
128 third\r
128 third\r (esc)
129 % hg revert
129 % hg revert
130 reverting native.txt
130 reverting native.txt
131 reverting unix.txt
131 reverting unix.txt
132 reverting win.txt
132 reverting win.txt
133 % hg import
133 % hg import
134 applying p
134 applying p
135 % printrepr.py native.txt
135 % native.txt
136 first
136 first
137 third
137 third
138 % printrepr.py unix.txt
138 % unix.txt
139 first
139 first
140 third
140 third
141 % printrepr.py win.txt
141 % win.txt
142 first\r
142 first\r (esc)
143 third\r
143 third\r (esc)
144 % hg diff -c tip
144 % hg diff -c tip
145 diff --git a/native.txt b/native.txt
145 diff --git a/native.txt b/native.txt
146 --- a/native.txt
146 --- a/native.txt
@@ -160,25 +160,25 b' Run tests'
160 --- a/win.txt
160 --- a/win.txt
161 +++ b/win.txt
161 +++ b/win.txt
162 @@ -1,3 +1,2 @@
162 @@ -1,3 +1,2 @@
163 first\r
163 first\r (esc)
164 -second\r
164 -second\r (esc)
165 third\r
165 third\r (esc)
166 $ dotest CRLF
166 $ dotest CRLF
167
167
168 % hg clone repo repo-CRLF
168 % hg clone repo repo-CRLF
169 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 % printrepr.py native.txt
170 % native.txt
171 first\r
171 first\r (esc)
172 second\r
172 second\r (esc)
173 third\r
173 third\r (esc)
174 % printrepr.py unix.txt
174 % unix.txt
175 first
175 first
176 second
176 second
177 third
177 third
178 % printrepr.py win.txt
178 % win.txt
179 first\r
179 first\r (esc)
180 second\r
180 second\r (esc)
181 third\r
181 third\r (esc)
182 % hg diff
182 % hg diff
183 diff --git a/native.txt b/native.txt
183 diff --git a/native.txt b/native.txt
184 --- a/native.txt
184 --- a/native.txt
@@ -198,24 +198,24 b' Run tests'
198 --- a/win.txt
198 --- a/win.txt
199 +++ b/win.txt
199 +++ b/win.txt
200 @@ -1,3 +1,2 @@
200 @@ -1,3 +1,2 @@
201 first\r
201 first\r (esc)
202 -second\r
202 -second\r (esc)
203 third\r
203 third\r (esc)
204 % hg revert
204 % hg revert
205 reverting native.txt
205 reverting native.txt
206 reverting unix.txt
206 reverting unix.txt
207 reverting win.txt
207 reverting win.txt
208 % hg import
208 % hg import
209 applying p
209 applying p
210 % printrepr.py native.txt
210 % native.txt
211 first\r
211 first\r (esc)
212 third\r
212 third\r (esc)
213 % printrepr.py unix.txt
213 % unix.txt
214 first
214 first
215 third
215 third
216 % printrepr.py win.txt
216 % win.txt
217 first\r
217 first\r (esc)
218 third\r
218 third\r (esc)
219 % hg diff -c tip
219 % hg diff -c tip
220 diff --git a/native.txt b/native.txt
220 diff --git a/native.txt b/native.txt
221 --- a/native.txt
221 --- a/native.txt
@@ -235,9 +235,9 b' Run tests'
235 --- a/win.txt
235 --- a/win.txt
236 +++ b/win.txt
236 +++ b/win.txt
237 @@ -1,3 +1,2 @@
237 @@ -1,3 +1,2 @@
238 first\r
238 first\r (esc)
239 -second\r
239 -second\r (esc)
240 third\r
240 third\r (esc)
241 $ rm -r repo
241 $ rm -r repo
242 $ makerepo CRLF
242 $ makerepo CRLF
243
243
@@ -251,26 +251,26 b' Run tests'
251
251
252 % hg clone repo repo-LF
252 % hg clone repo repo-LF
253 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 % printrepr.py native.txt
254 % native.txt
255 first
255 first
256 second
256 second
257 third
257 third
258 % printrepr.py unix.txt
258 % unix.txt
259 first
259 first
260 second
260 second
261 third
261 third
262 % printrepr.py win.txt
262 % win.txt
263 first\r
263 first\r (esc)
264 second\r
264 second\r (esc)
265 third\r
265 third\r (esc)
266 % hg diff
266 % hg diff
267 diff --git a/native.txt b/native.txt
267 diff --git a/native.txt b/native.txt
268 --- a/native.txt
268 --- a/native.txt
269 +++ b/native.txt
269 +++ b/native.txt
270 @@ -1,3 +1,2 @@
270 @@ -1,3 +1,2 @@
271 first\r
271 first\r (esc)
272 -second\r
272 -second\r (esc)
273 third\r
273 third\r (esc)
274 diff --git a/unix.txt b/unix.txt
274 diff --git a/unix.txt b/unix.txt
275 --- a/unix.txt
275 --- a/unix.txt
276 +++ b/unix.txt
276 +++ b/unix.txt
@@ -282,32 +282,32 b' Run tests'
282 --- a/win.txt
282 --- a/win.txt
283 +++ b/win.txt
283 +++ b/win.txt
284 @@ -1,3 +1,2 @@
284 @@ -1,3 +1,2 @@
285 first\r
285 first\r (esc)
286 -second\r
286 -second\r (esc)
287 third\r
287 third\r (esc)
288 % hg revert
288 % hg revert
289 reverting native.txt
289 reverting native.txt
290 reverting unix.txt
290 reverting unix.txt
291 reverting win.txt
291 reverting win.txt
292 % hg import
292 % hg import
293 applying p
293 applying p
294 % printrepr.py native.txt
294 % native.txt
295 first
295 first
296 third
296 third
297 % printrepr.py unix.txt
297 % unix.txt
298 first
298 first
299 third
299 third
300 % printrepr.py win.txt
300 % win.txt
301 first\r
301 first\r (esc)
302 third\r
302 third\r (esc)
303 % hg diff -c tip
303 % hg diff -c tip
304 diff --git a/native.txt b/native.txt
304 diff --git a/native.txt b/native.txt
305 --- a/native.txt
305 --- a/native.txt
306 +++ b/native.txt
306 +++ b/native.txt
307 @@ -1,3 +1,2 @@
307 @@ -1,3 +1,2 @@
308 first\r
308 first\r (esc)
309 -second\r
309 -second\r (esc)
310 third\r
310 third\r (esc)
311 diff --git a/unix.txt b/unix.txt
311 diff --git a/unix.txt b/unix.txt
312 --- a/unix.txt
312 --- a/unix.txt
313 +++ b/unix.txt
313 +++ b/unix.txt
@@ -319,33 +319,33 b' Run tests'
319 --- a/win.txt
319 --- a/win.txt
320 +++ b/win.txt
320 +++ b/win.txt
321 @@ -1,3 +1,2 @@
321 @@ -1,3 +1,2 @@
322 first\r
322 first\r (esc)
323 -second\r
323 -second\r (esc)
324 third\r
324 third\r (esc)
325 $ dotest CRLF
325 $ dotest CRLF
326
326
327 % hg clone repo repo-CRLF
327 % hg clone repo repo-CRLF
328 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
328 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
329 % printrepr.py native.txt
329 % native.txt
330 first\r
330 first\r (esc)
331 second\r
331 second\r (esc)
332 third\r
332 third\r (esc)
333 % printrepr.py unix.txt
333 % unix.txt
334 first
334 first
335 second
335 second
336 third
336 third
337 % printrepr.py win.txt
337 % win.txt
338 first\r
338 first\r (esc)
339 second\r
339 second\r (esc)
340 third\r
340 third\r (esc)
341 % hg diff
341 % hg diff
342 diff --git a/native.txt b/native.txt
342 diff --git a/native.txt b/native.txt
343 --- a/native.txt
343 --- a/native.txt
344 +++ b/native.txt
344 +++ b/native.txt
345 @@ -1,3 +1,2 @@
345 @@ -1,3 +1,2 @@
346 first\r
346 first\r (esc)
347 -second\r
347 -second\r (esc)
348 third\r
348 third\r (esc)
349 diff --git a/unix.txt b/unix.txt
349 diff --git a/unix.txt b/unix.txt
350 --- a/unix.txt
350 --- a/unix.txt
351 +++ b/unix.txt
351 +++ b/unix.txt
@@ -357,32 +357,32 b' Run tests'
357 --- a/win.txt
357 --- a/win.txt
358 +++ b/win.txt
358 +++ b/win.txt
359 @@ -1,3 +1,2 @@
359 @@ -1,3 +1,2 @@
360 first\r
360 first\r (esc)
361 -second\r
361 -second\r (esc)
362 third\r
362 third\r (esc)
363 % hg revert
363 % hg revert
364 reverting native.txt
364 reverting native.txt
365 reverting unix.txt
365 reverting unix.txt
366 reverting win.txt
366 reverting win.txt
367 % hg import
367 % hg import
368 applying p
368 applying p
369 % printrepr.py native.txt
369 % native.txt
370 first\r
370 first\r (esc)
371 third\r
371 third\r (esc)
372 % printrepr.py unix.txt
372 % unix.txt
373 first
373 first
374 third
374 third
375 % printrepr.py win.txt
375 % win.txt
376 first\r
376 first\r (esc)
377 third\r
377 third\r (esc)
378 % hg diff -c tip
378 % hg diff -c tip
379 diff --git a/native.txt b/native.txt
379 diff --git a/native.txt b/native.txt
380 --- a/native.txt
380 --- a/native.txt
381 +++ b/native.txt
381 +++ b/native.txt
382 @@ -1,3 +1,2 @@
382 @@ -1,3 +1,2 @@
383 first\r
383 first\r (esc)
384 -second\r
384 -second\r (esc)
385 third\r
385 third\r (esc)
386 diff --git a/unix.txt b/unix.txt
386 diff --git a/unix.txt b/unix.txt
387 --- a/unix.txt
387 --- a/unix.txt
388 +++ b/unix.txt
388 +++ b/unix.txt
@@ -394,7 +394,7 b' Run tests'
394 --- a/win.txt
394 --- a/win.txt
395 +++ b/win.txt
395 +++ b/win.txt
396 @@ -1,3 +1,2 @@
396 @@ -1,3 +1,2 @@
397 first\r
397 first\r (esc)
398 -second\r
398 -second\r (esc)
399 third\r
399 third\r (esc)
400 $ rm -r repo
400 $ rm -r repo
@@ -54,23 +54,23 b' Test EOL update'
54 >
54 >
55 > hg update
55 > hg update
56 >
56 >
57 > echo '% printrepr.py a.txt (before)'
57 > echo '% a.txt (before)'
58 > python $TESTDIR/printrepr.py < a.txt
58 > cat a.txt
59 >
59 >
60 > printf "first${EOL}third${EOL}" > a.txt
60 > printf "first${EOL}third${EOL}" > a.txt
61 >
61 >
62 > echo '% printrepr.py a.txt (after)'
62 > echo '% a.txt (after)'
63 > python $TESTDIR/printrepr.py < a.txt
63 > cat a.txt
64 > echo '% hg diff'
64 > echo '% hg diff'
65 > hg diff | python $TESTDIR/printrepr.py
65 > hg diff
66 >
66 >
67 > echo '% hg update 0'
67 > echo '% hg update 0'
68 > hg update 0
68 > hg update 0
69 >
69 >
70 > echo '% printrepr.py a.txt'
70 > echo '% a.txt'
71 > python $TESTDIR/printrepr.py < a.txt
71 > cat a.txt
72 > echo '% hg diff'
72 > echo '% hg diff'
73 > hg diff | python $TESTDIR/printrepr.py
73 > hg diff
74 >
74 >
75 >
75 >
76 > cd ..
76 > cd ..
@@ -87,11 +87,11 b' Test EOL update'
87
87
88 % hg clone repo repo-LF
88 % hg clone repo repo-LF
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 % printrepr.py a.txt (before)
90 % a.txt (before)
91 first\r
91 first\r (esc)
92 second\r
92 second\r (esc)
93 third\r
93 third\r (esc)
94 % printrepr.py a.txt (after)
94 % a.txt (after)
95 first
95 first
96 third
96 third
97 % hg diff
97 % hg diff
@@ -99,13 +99,13 b' Test EOL update'
99 --- a/a.txt
99 --- a/a.txt
100 +++ b/a.txt
100 +++ b/a.txt
101 @@ -1,3 +1,2 @@
101 @@ -1,3 +1,2 @@
102 first\r
102 first\r (esc)
103 -second\r
103 -second\r (esc)
104 third\r
104 third\r (esc)
105 % hg update 0
105 % hg update 0
106 merging a.txt
106 merging a.txt
107 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
107 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
108 % printrepr.py a.txt
108 % a.txt
109 first
109 first
110 third
110 third
111 % hg diff
111 % hg diff
@@ -120,25 +120,25 b' Test EOL update'
120
120
121 % hg clone repo repo-CRLF
121 % hg clone repo repo-CRLF
122 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 % printrepr.py a.txt (before)
123 % a.txt (before)
124 first\r
124 first\r (esc)
125 second\r
125 second\r (esc)
126 third\r
126 third\r (esc)
127 % printrepr.py a.txt (after)
127 % a.txt (after)
128 first\r
128 first\r (esc)
129 third\r
129 third\r (esc)
130 % hg diff
130 % hg diff
131 diff --git a/a.txt b/a.txt
131 diff --git a/a.txt b/a.txt
132 --- a/a.txt
132 --- a/a.txt
133 +++ b/a.txt
133 +++ b/a.txt
134 @@ -1,3 +1,2 @@
134 @@ -1,3 +1,2 @@
135 first\r
135 first\r (esc)
136 -second\r
136 -second\r (esc)
137 third\r
137 third\r (esc)
138 % hg update 0
138 % hg update 0
139 merging a.txt
139 merging a.txt
140 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
140 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
141 % printrepr.py a.txt
141 % a.txt
142 first
142 first
143 third
143 third
144 % hg diff
144 % hg diff
@@ -61,20 +61,20 b' Set up helpers'
61 > native = $1
61 > native = $1
62 > EOF
62 > EOF
63 > hg update
63 > hg update
64 > echo '% printrepr.py a.txt'
64 > echo '% a.txt'
65 > python $TESTDIR/printrepr.py < a.txt
65 > cat a.txt
66 > echo '% hg cat a.txt'
66 > echo '% hg cat a.txt'
67 > hg cat a.txt | python $TESTDIR/printrepr.py
67 > hg cat a.txt
68 > printf "fourth${EOL}" >> a.txt
68 > printf "fourth${EOL}" >> a.txt
69 > echo '% printrepr.py a.txt'
69 > echo '% a.txt'
70 > python $TESTDIR/printrepr.py < a.txt
70 > cat a.txt
71 > hg diff | python $TESTDIR/printrepr.py
71 > hg diff
72 > python ../switch-eol.py $1 a.txt
72 > python ../switch-eol.py $1 a.txt
73 > echo '% hg diff only reports a single changed line:'
73 > echo '% hg diff only reports a single changed line:'
74 > hg diff | python $TESTDIR/printrepr.py
74 > hg diff
75 > echo "% reverting back to $1 format"
75 > echo "% reverting back to $1 format"
76 > hg revert a.txt
76 > hg revert a.txt
77 > python $TESTDIR/printrepr.py < a.txt
77 > cat a.txt
78 > printf "first\r\nsecond\n" > mixed.txt
78 > printf "first\r\nsecond\n" > mixed.txt
79 > hg add mixed.txt
79 > hg add mixed.txt
80 > echo "% hg commit of inconsistent .txt file marked as binary (should work)"
80 > echo "% hg commit of inconsistent .txt file marked as binary (should work)"
@@ -144,7 +144,7 b' Basic tests'
144 $ dotest LF
144 $ dotest LF
145 % hg clone repo repo-LF
145 % hg clone repo repo-LF
146 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
146 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 % printrepr.py a.txt
147 % a.txt
148 first
148 first
149 second
149 second
150 third
150 third
@@ -152,7 +152,7 b' Basic tests'
152 first
152 first
153 second
153 second
154 third
154 third
155 % printrepr.py a.txt
155 % a.txt
156 first
156 first
157 second
157 second
158 third
158 third
@@ -188,19 +188,19 b' Basic tests'
188 $ dotest CRLF
188 $ dotest CRLF
189 % hg clone repo repo-CRLF
189 % hg clone repo repo-CRLF
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 % printrepr.py a.txt
191 % a.txt
192 first\r
192 first\r (esc)
193 second\r
193 second\r (esc)
194 third\r
194 third\r (esc)
195 % hg cat a.txt
195 % hg cat a.txt
196 first
196 first
197 second
197 second
198 third
198 third
199 % printrepr.py a.txt
199 % a.txt
200 first\r
200 first\r (esc)
201 second\r
201 second\r (esc)
202 third\r
202 third\r (esc)
203 fourth\r
203 fourth\r (esc)
204 diff --git a/a.txt b/a.txt
204 diff --git a/a.txt b/a.txt
205 --- a/a.txt
205 --- a/a.txt
206 +++ b/a.txt
206 +++ b/a.txt
@@ -220,9 +220,9 b' Basic tests'
220 third
220 third
221 +fourth
221 +fourth
222 % reverting back to CRLF format
222 % reverting back to CRLF format
223 first\r
223 first\r (esc)
224 second\r
224 second\r (esc)
225 third\r
225 third\r (esc)
226 % hg commit of inconsistent .txt file marked as binary (should work)
226 % hg commit of inconsistent .txt file marked as binary (should work)
227 % hg commit of inconsistent .txt file marked as native (should fail)
227 % hg commit of inconsistent .txt file marked as native (should fail)
228 abort: inconsistent newline style in a.txt
228 abort: inconsistent newline style in a.txt
@@ -238,15 +238,15 b' Basic tests'
238 $ dotest LF
238 $ dotest LF
239 % hg clone repo repo-LF
239 % hg clone repo repo-LF
240 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
241 % printrepr.py a.txt
241 % a.txt
242 first
242 first
243 second
243 second
244 third
244 third
245 % hg cat a.txt
245 % hg cat a.txt
246 first\r
246 first\r (esc)
247 second\r
247 second\r (esc)
248 third\r
248 third\r (esc)
249 % printrepr.py a.txt
249 % a.txt
250 first
250 first
251 second
251 second
252 third
252 third
@@ -255,20 +255,20 b' Basic tests'
255 --- a/a.txt
255 --- a/a.txt
256 +++ b/a.txt
256 +++ b/a.txt
257 @@ -1,3 +1,4 @@
257 @@ -1,3 +1,4 @@
258 first\r
258 first\r (esc)
259 second\r
259 second\r (esc)
260 third\r
260 third\r (esc)
261 +fourth\r
261 +fourth\r (esc)
262 % switching encoding from '\n' to '\r\n'
262 % switching encoding from '\n' to '\r\n'
263 % hg diff only reports a single changed line:
263 % hg diff only reports a single changed line:
264 diff --git a/a.txt b/a.txt
264 diff --git a/a.txt b/a.txt
265 --- a/a.txt
265 --- a/a.txt
266 +++ b/a.txt
266 +++ b/a.txt
267 @@ -1,3 +1,4 @@
267 @@ -1,3 +1,4 @@
268 first\r
268 first\r (esc)
269 second\r
269 second\r (esc)
270 third\r
270 third\r (esc)
271 +fourth\r
271 +fourth\r (esc)
272 % reverting back to LF format
272 % reverting back to LF format
273 first
273 first
274 second
274 second
@@ -282,41 +282,41 b' Basic tests'
282 $ dotest CRLF
282 $ dotest CRLF
283 % hg clone repo repo-CRLF
283 % hg clone repo repo-CRLF
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 % printrepr.py a.txt
285 % a.txt
286 first\r
286 first\r (esc)
287 second\r
287 second\r (esc)
288 third\r
288 third\r (esc)
289 % hg cat a.txt
289 % hg cat a.txt
290 first\r
290 first\r (esc)
291 second\r
291 second\r (esc)
292 third\r
292 third\r (esc)
293 % printrepr.py a.txt
293 % a.txt
294 first\r
294 first\r (esc)
295 second\r
295 second\r (esc)
296 third\r
296 third\r (esc)
297 fourth\r
297 fourth\r (esc)
298 diff --git a/a.txt b/a.txt
298 diff --git a/a.txt b/a.txt
299 --- a/a.txt
299 --- a/a.txt
300 +++ b/a.txt
300 +++ b/a.txt
301 @@ -1,3 +1,4 @@
301 @@ -1,3 +1,4 @@
302 first\r
302 first\r (esc)
303 second\r
303 second\r (esc)
304 third\r
304 third\r (esc)
305 +fourth\r
305 +fourth\r (esc)
306 % switching encoding from '\r\n' to '\n'
306 % switching encoding from '\r\n' to '\n'
307 % hg diff only reports a single changed line:
307 % hg diff only reports a single changed line:
308 diff --git a/a.txt b/a.txt
308 diff --git a/a.txt b/a.txt
309 --- a/a.txt
309 --- a/a.txt
310 +++ b/a.txt
310 +++ b/a.txt
311 @@ -1,3 +1,4 @@
311 @@ -1,3 +1,4 @@
312 first\r
312 first\r (esc)
313 second\r
313 second\r (esc)
314 third\r
314 third\r (esc)
315 +fourth\r
315 +fourth\r (esc)
316 % reverting back to CRLF format
316 % reverting back to CRLF format
317 first\r
317 first\r (esc)
318 second\r
318 second\r (esc)
319 third\r
319 third\r (esc)
320 % hg commit of inconsistent .txt file marked as binary (should work)
320 % hg commit of inconsistent .txt file marked as binary (should work)
321 % hg commit of inconsistent .txt file marked as native (should fail)
321 % hg commit of inconsistent .txt file marked as native (should fail)
322 abort: inconsistent newline style in a.txt
322 abort: inconsistent newline style in a.txt
@@ -352,10 +352,10 b' Move text file and patch as binary'
352 > EOF
352 > EOF
353 applying patch from stdin
353 applying patch from stdin
354
354
355 $ python $TESTDIR/printrepr.py < binary2
355 $ cat binary2
356 a
356 a
357 b
357 b
358 \x00
358 \x00 (no-eol) (esc)
359
359
360 $ hg st --copies --change .
360 $ hg st --copies --change .
361 A binary2
361 A binary2
@@ -919,15 +919,13 b' branches'
919
919
920 changegroup
920 changegroup
921
921
922 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000' \
922 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
923 > | $TESTDIR/printrepr.py
924 200 Script output follows
923 200 Script output follows
925
924
926 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82
925 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 (esc)
927 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\
926 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\\n\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee \xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk (esc)
928 \xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee\t\xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk
927 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3'\x859 (esc)
929 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3\'\x859
928 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00 _\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc (no-eol) (esc)
930 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf\'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00\t_\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc
931
929
932 stream_out
930 stream_out
933
931
@@ -583,19 +583,19 b' errors encountered'
583 >
583 >
584 > echo % hgweb filerevision, html
584 > echo % hgweb filerevision, html
585 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
585 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
586 > | grep '<div class="parity0 source">' | $TESTDIR/printrepr.py
586 > | grep '<div class="parity0 source">'
587 > echo % errors encountered
587 > echo % errors encountered
588 > cat errors.log
588 > cat errors.log
589 > }
589 > }
590 $ hgserveget euc-jp eucjp.txt
590 $ hgserveget euc-jp eucjp.txt
591 % HGENCODING=euc-jp hg serve
591 % HGENCODING=euc-jp hg serve
592 % hgweb filerevision, html
592 % hgweb filerevision, html
593 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div>
593 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div> (esc)
594 % errors encountered
594 % errors encountered
595 $ hgserveget utf-8 eucjp.txt
595 $ hgserveget utf-8 eucjp.txt
596 % HGENCODING=utf-8 hg serve
596 % HGENCODING=utf-8 hg serve
597 % hgweb filerevision, html
597 % hgweb filerevision, html
598 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div>
598 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div> (esc)
599 % errors encountered
599 % errors encountered
600 $ hgserveget us-ascii eucjp.txt
600 $ hgserveget us-ascii eucjp.txt
601 % HGENCODING=us-ascii hg serve
601 % HGENCODING=us-ascii hg serve
@@ -45,8 +45,13 b' force LF'
45
45
46 $ hg --traceback --config patch.eol='LF' import eol.diff
46 $ hg --traceback --config patch.eol='LF' import eol.diff
47 applying eol.diff
47 applying eol.diff
48 $ python -c 'print repr(file("a","rb").read())'
48 $ cat a
49 'a\nyyyy\ncc\n\nd\ne'
49 a
50 yyyy
51 cc
52
53 d
54 e (no-eol)
50 $ hg st
55 $ hg st
51
56
52
57
@@ -56,8 +61,13 b' force CRLF'
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 $ hg --traceback --config patch.eol='CRLF' import eol.diff
62 $ hg --traceback --config patch.eol='CRLF' import eol.diff
58 applying eol.diff
63 applying eol.diff
59 $ python -c 'print repr(file("a","rb").read())'
64 $ cat a
60 'a\r\nyyyy\r\ncc\r\n\r\nd\r\ne'
65 a\r (esc)
66 yyyy\r (esc)
67 cc\r (esc)
68 \r (esc)
69 d\r (esc)
70 e (no-eol)
61 $ hg st
71 $ hg st
62
72
63
73
@@ -67,8 +77,13 b' auto EOL on LF file'
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 $ hg --traceback --config patch.eol='auto' import eol.diff
78 $ hg --traceback --config patch.eol='auto' import eol.diff
69 applying eol.diff
79 applying eol.diff
70 $ python -c 'print repr(file("a","rb").read())'
80 $ cat a
71 'a\nyyyy\ncc\n\nd\ne'
81 a
82 yyyy
83 cc
84
85 d
86 e (no-eol)
72 $ hg st
87 $ hg st
73
88
74
89
@@ -78,8 +93,13 b' auto EOL on CRLF file'
78 $ hg commit -m 'switch EOLs in a'
93 $ hg commit -m 'switch EOLs in a'
79 $ hg --traceback --config patch.eol='auto' import eol.diff
94 $ hg --traceback --config patch.eol='auto' import eol.diff
80 applying eol.diff
95 applying eol.diff
81 $ python -c 'print repr(file("a","rb").read())'
96 $ cat a
82 'a\r\nyyyy\r\ncc\r\n\r\nd\r\ne'
97 a\r (esc)
98 yyyy\r (esc)
99 cc\r (esc)
100 \r (esc)
101 d\r (esc)
102 e (no-eol)
83 $ hg st
103 $ hg st
84
104
85
105
@@ -96,10 +116,12 b' auto EOL on new file or source without a'
96 $ rm neweol
116 $ rm neweol
97 $ hg --traceback --config patch.eol='auto' import -m noeol noeol.diff
117 $ hg --traceback --config patch.eol='auto' import -m noeol noeol.diff
98 applying noeol.diff
118 applying noeol.diff
99 $ python -c 'print repr(file("noeol","rb").read())'
119 $ cat noeol
100 'noeol\r\nnoeol\n'
120 noeol\r (esc)
101 $ python -c 'print repr(file("neweol","rb").read())'
121 noeol
102 'neweol\nneweol\r\n'
122 $ cat neweol
123 neweol
124 neweol\r (esc)
103 $ hg st
125 $ hg st
104
126
105
127
@@ -116,7 +138,9 b' binary patch with --eol'
116
138
117 $ hg import --config patch.eol='CRLF' -m changeb bin.diff
139 $ hg import --config patch.eol='CRLF' -m changeb bin.diff
118 applying bin.diff
140 applying bin.diff
119 $ python -c 'print repr(file("b","rb").read())'
141 $ cat b
120 'a\x00\nc\r\nd'
142 a\x00 (esc)
143 c\r (esc)
144 d (no-eol)
121 $ hg st
145 $ hg st
122 $ cd ..
146 $ cd ..
@@ -104,9 +104,9 b' binary file'
104
104
105 binary file --text
105 binary file --text
106
106
107 $ python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/printrepr.py
107 $ python simplemerge -a -p binary-local base other 2>&1
108 warning: binary-local looks like a binary file.
108 warning: binary-local looks like a binary file.
109 \x00local
109 \x00local (esc)
110 base
110 base
111 other
111 other
112
112
@@ -357,6 +357,7 b' test with a win32ext like setup (differi'
357 $ hg transplant -s ../twin1 tip
357 $ hg transplant -s ../twin1 tip
358 applying 2e849d776c17
358 applying 2e849d776c17
359 2e849d776c17 transplanted to 589cea8ba85b
359 2e849d776c17 transplanted to 589cea8ba85b
360 $ python -c "print repr(file('b', 'rb').read())"
360 $ cat b
361 'a\r\nb\r\n'
361 a\r (esc)
362 b\r (esc)
362 $ cd ..
363 $ cd ..
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now