Show More
@@ -180,7 +180,7 b' Test files status in different revisions' | |||||
180 |
|
180 | |||
181 | Test files properties |
|
181 | Test files properties | |
182 |
|
182 | |||
183 | >>> open('bin', 'wb').write(b'\0a') |
|
183 | >>> open('bin', 'wb').write(b'\0a') and None | |
184 |
$ |
|
184 | $ fileset 'binary()' | |
185 |
$ |
|
185 | $ fileset 'binary() and unknown()' | |
186 | bin |
|
186 | bin | |
@@ -219,8 +219,8 b' Test files properties' | |||||
219 | $ hg --config ui.portablefilenames=ignore add con.xml |
|
219 | $ hg --config ui.portablefilenames=ignore add con.xml | |
220 | #endif |
|
220 | #endif | |
221 |
|
221 | |||
222 | >>> open('1k', 'wb').write(b' '*1024) |
|
222 | >>> open('1k', 'wb').write(b' '*1024) and None | |
223 | >>> open('2k', 'wb').write(b' '*2048) |
|
223 | >>> open('2k', 'wb').write(b' '*2048) and None | |
224 |
$ |
|
224 | $ hg add 1k 2k | |
225 | $ fileset 'size("bar")' |
|
225 | $ fileset 'size("bar")' | |
226 | hg: parse error: couldn't parse size: bar |
|
226 | hg: parse error: couldn't parse size: bar | |
@@ -391,9 +391,9 b' Test with a revision' | |||||
391 | b2 |
|
391 | b2 | |
392 | c1 |
|
392 | c1 | |
393 |
|
393 | |||
394 | >>> open('dos', 'wb').write("dos\r\n") |
|
394 | >>> open('dos', 'wb').write(b"dos\r\n") and None | |
395 | >>> open('mixed', 'wb').write("dos\r\nunix\n") |
|
395 | >>> open('mixed', 'wb').write(b"dos\r\nunix\n") and None | |
396 | >>> open('mac', 'wb').write("mac\r") |
|
396 | >>> open('mac', 'wb').write(b"mac\r") and None | |
397 | $ hg add dos mixed mac |
|
397 | $ hg add dos mixed mac | |
398 |
|
398 | |||
399 | (remove a1, to examine safety of 'eol' on removed files) |
|
399 | (remove a1, to examine safety of 'eol' on removed files) |
@@ -566,7 +566,7 b' Simulate a copy/paste turning LF into CR' | |||||
566 | >>> fp = open('binary.diff', 'rb') |
|
566 | >>> fp = open('binary.diff', 'rb') | |
567 | >>> data = fp.read() |
|
567 | >>> data = fp.read() | |
568 | >>> fp.close() |
|
568 | >>> fp.close() | |
569 | >>> open('binary.diff', 'wb').write(data.replace(b'\n', b'\r\n')) |
|
569 | >>> open('binary.diff', 'wb').write(data.replace(b'\n', b'\r\n')) and None | |
570 |
$ |
|
570 | $ rm binary2 | |
571 | $ hg import --no-commit binary.diff |
|
571 | $ hg import --no-commit binary.diff | |
572 | applying binary.diff |
|
572 | applying binary.diff |
@@ -243,8 +243,8 b" Test issue 3764 (interpreting 'today' an" | |||||
243 | >>> today = datetime.date.today().strftime("%b %d") |
|
243 | >>> today = datetime.date.today().strftime("%b %d") | |
244 | >>> yesterday = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%b %d") |
|
244 | >>> yesterday = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%b %d") | |
245 | >>> dates = open('dates', 'w') |
|
245 | >>> dates = open('dates', 'w') | |
246 | >>> dates.write(today + '\n') |
|
246 | >>> dates.write(today + '\n') and None | |
247 | >>> dates.write(yesterday + '\n') |
|
247 | >>> dates.write(yesterday + '\n') and None | |
248 | >>> dates.close() |
|
248 | >>> dates.close() | |
249 | $ hg ci -d "`sed -n '1p' dates`" -m "today is a good day to code" |
|
249 | $ hg ci -d "`sed -n '1p' dates`" -m "today is a good day to code" | |
250 | $ hg log -d today --template '{desc}\n' |
|
250 | $ hg log -d today --template '{desc}\n' |
@@ -4,7 +4,7 b'' | |||||
4 | Flags on revlog version 0 are rejected |
|
4 | Flags on revlog version 0 are rejected | |
5 |
|
5 | |||
6 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: |
|
6 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: | |
7 | ... fh.write(b'\x00\x01\x00\x00') |
|
7 | ... fh.write(b'\x00\x01\x00\x00') and None | |
8 |
|
8 | |||
9 |
$ |
|
9 | $ hg log | |
10 | abort: unknown flags (0x01) in version 0 revlog 00changelog.i! |
|
10 | abort: unknown flags (0x01) in version 0 revlog 00changelog.i! | |
@@ -13,7 +13,7 b' Flags on revlog version 0 are rejected' | |||||
13 | Unknown flags on revlog version 1 are rejected |
|
13 | Unknown flags on revlog version 1 are rejected | |
14 |
|
14 | |||
15 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: |
|
15 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: | |
16 | ... fh.write(b'\x00\x04\x00\x01') |
|
16 | ... fh.write(b'\x00\x04\x00\x01') and None | |
17 |
|
17 | |||
18 |
$ |
|
18 | $ hg log | |
19 | abort: unknown flags (0x04) in version 1 revlog 00changelog.i! |
|
19 | abort: unknown flags (0x04) in version 1 revlog 00changelog.i! | |
@@ -22,7 +22,7 b' Unknown flags on revlog version 1 are re' | |||||
22 | Unknown version is rejected |
|
22 | Unknown version is rejected | |
23 |
|
23 | |||
24 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: |
|
24 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: | |
25 | ... fh.write(b'\x00\x00\x00\x02') |
|
25 | ... fh.write(b'\x00\x00\x00\x02') and None | |
26 |
|
26 | |||
27 |
$ |
|
27 | $ hg log | |
28 | abort: unknown version (2) in revlog 00changelog.i! |
|
28 | abort: unknown version (2) in revlog 00changelog.i! |
@@ -50,13 +50,13 b' Empty placeholder:' | |||||
50 |
|
50 | |||
51 | Write binary data to the placeholder: |
|
51 | Write binary data to the placeholder: | |
52 |
|
52 | |||
53 | >>> open('b', 'w').write('this is a binary\0') |
|
53 | >>> open('b', 'w').write('this is a binary\0') and None | |
54 |
$ |
|
54 | $ hg --config extensions.n=$TESTTMP/nolink.py st --debug | |
55 | ignoring suspect symlink placeholder "b" |
|
55 | ignoring suspect symlink placeholder "b" | |
56 |
|
56 | |||
57 | Write a long string to the placeholder: |
|
57 | Write a long string to the placeholder: | |
58 |
|
58 | |||
59 | >>> open('b', 'w').write('this' * 1000) |
|
59 | >>> open('b', 'w').write('this' * 1000) and None | |
60 |
$ |
|
60 | $ hg --config extensions.n=$TESTTMP/nolink.py st --debug | |
61 | ignoring suspect symlink placeholder "b" |
|
61 | ignoring suspect symlink placeholder "b" | |
62 |
|
62 | |||
@@ -68,7 +68,7 b" Commit shouldn't succeed:" | |||||
68 |
|
68 | |||
69 | Write a valid string to the placeholder: |
|
69 | Write a valid string to the placeholder: | |
70 |
|
70 | |||
71 | >>> open('b', 'w').write('this') |
|
71 | >>> open('b', 'w').write('this') and None | |
72 | $ hg --config extensions.n=$TESTTMP/nolink.py st --debug |
|
72 | $ hg --config extensions.n=$TESTTMP/nolink.py st --debug | |
73 | M b |
|
73 | M b | |
74 | $ hg --config extensions.n=$TESTTMP/nolink.py ci -m1 |
|
74 | $ hg --config extensions.n=$TESTTMP/nolink.py ci -m1 |
General Comments 0
You need to be logged in to leave comments.
Login now