Mercurial > hg
annotate tests/test-import-eol.t @ 28600:0d6137891114
graphmod: allow for different styles for different edge types
Rather than draw all edges as solid lines, allow for using different styles for
different edge types. For example you could use dotted lines for edges that
do not connect to a parent, and dashed lines when connecting to a grandparent
(implying missing nodes in between).
For example, setting the following configuration:
[ui]
graphstyle.grandparent = :
graphstyle.missing = .
would result in a graph like this:
o changeset: 32:d06dffa21a31
|\ parent: 27:886ed638191b
| : parent: 31:621d83e11f67
| :
o : changeset: 31:621d83e11f67
|\: parent: 21:d42a756af44d
| : parent: 30:6e11cd4b648f
| :
o : changeset: 30:6e11cd4b648f
|\ \ parent: 28:44ecd0b9ae99
| . : parent: 29:cd9bb2be7593
| . :
o . : changeset: 28:44ecd0b9ae99
|\ \ \ parent: 1:6db2ef61d156
| . . : parent: 26:7f25b6c2f0b9
| . . :
o . . : changeset: 26:7f25b6c2f0b9
|\ \ \ \ parent: 18:1aa84d96232a
| | . . : parent: 25:91da8ed57247
| | . . :
| o-----+ changeset: 25:91da8ed57247
| | . . : parent: 21:d42a756af44d
| | . . : parent: 24:a9c19a3d96b7
| | . . :
| o . . : changeset: 24:a9c19a3d96b7
| |\ \ \ \ parent: 0:e6eb3150255d
| | . . . : parent: 23:a01cddf0766d
| | . . . :
| o---+ . : changeset: 23:a01cddf0766d
| | . . . : parent: 1:6db2ef61d156
| | . . . : parent: 22:e0d9cccacb5d
| | . . . :
| o-------+ changeset: 22:e0d9cccacb5d
| . . . . : parent: 18:1aa84d96232a
|/ / / / / parent: 21:d42a756af44d
| . . . :
| . . . o changeset: 21:d42a756af44d
| . . . |\ parent: 19:31ddc2c1573b
| . . . | | parent: 20:d30ed6450e32
| . . . | |
+-+-------o changeset: 20:d30ed6450e32
| . . . | parent: 0:e6eb3150255d
| . . . | parent: 18:1aa84d96232a
| . . . |
| . . . o changeset: 19:31ddc2c1573b
| . . . .\ parent: 15:1dda3f72782d
| . . . . | parent: 17:44765d7c06e0
| . . . . |
o---+---+ | changeset: 18:1aa84d96232a
. . . . | parent: 1:6db2ef61d156
/ / / / / parent: 15:1dda3f72782d
. . . . .
Edge styles can be altered by setting the following one-character config options::
[ui]
graphstyle.parent = |
graphstyle.grandparent = :
graphstyle.missing = .
The default configuration leaves all 3 types set to |, leaving graph styles
unaffected.
This is part of the work towards moving smartlog upstream; currently smartlog
injects extra nodes into the graph to indicate grandparent relationships (nodes
elided).
author | Martijn Pieters <mjpieters@fb.com> |
---|---|
date | Sat, 19 Mar 2016 16:46:15 -0700 |
parents | c63a09b6b337 |
children | 75be14993fda |
rev | line source |
---|---|
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
1 $ cat > makepatch.py <<EOF |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
2 > f = file('eol.diff', 'wb') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
3 > w = f.write |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
4 > w('test message\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
5 > w('diff --git a/a b/a\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
6 > w('--- a/a\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
7 > w('+++ b/a\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
8 > w('@@ -1,5 +1,5 @@\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
9 > w(' a\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
10 > w('-bbb\r\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
11 > w('+yyyy\r\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
12 > w(' cc\r\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
13 > w(' \n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
14 > w(' d\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
15 > w('-e\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
16 > w('\ No newline at end of file\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
17 > w('+z\r\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
18 > w('\ No newline at end of file\r\n') |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
19 > EOF |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
20 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
21 $ hg init repo |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
22 $ cd repo |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
23 $ echo '\.diff' > .hgignore |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
24 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
25 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
26 Test different --eol values |
8810
ac92775b3b80
Add patch.eol to ignore EOLs when patching (issue1019)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
28 $ $PYTHON -c 'file("a", "wb").write("a\nbbb\ncc\n\nd\ne")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
29 $ hg ci -Am adda |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
30 adding .hgignore |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
31 adding a |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
32 $ python ../makepatch.py |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
33 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
34 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
35 invalid eol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
36 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
37 $ hg --config patch.eol='LFCR' import eol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
38 applying eol.diff |
12070 | 39 abort: unsupported line endings type: LFCR |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12070
diff
changeset
|
40 [255] |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
41 $ hg revert -a |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
42 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
43 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
44 force LF |
8810
ac92775b3b80
Add patch.eol to ignore EOLs when patching (issue1019)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
46 $ hg --traceback --config patch.eol='LF' import eol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
47 applying eol.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
48 $ cat a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
49 a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
50 yyyy |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
51 cc |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
52 |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
53 d |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
54 e (no-eol) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
55 $ hg st |
8810
ac92775b3b80
Add patch.eol to ignore EOLs when patching (issue1019)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
56 |
10102
1720d70cd6d4
patch: implement patch.eol=auto mode
Martin Geisler <mg@lazybytes.net>
parents:
8817
diff
changeset
|
57 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
58 force CRLF |
10102
1720d70cd6d4
patch: implement patch.eol=auto mode
Martin Geisler <mg@lazybytes.net>
parents:
8817
diff
changeset
|
59 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
60 $ hg up -C 0 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
62 $ hg --traceback --config patch.eol='CRLF' import eol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
63 applying eol.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
64 $ cat a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
65 a\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
66 yyyy\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
67 cc\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
68 \r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
69 d\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
70 e (no-eol) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
71 $ hg st |
10102
1720d70cd6d4
patch: implement patch.eol=auto mode
Martin Geisler <mg@lazybytes.net>
parents:
8817
diff
changeset
|
72 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
73 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
74 auto EOL on LF file |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
75 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
76 $ hg up -C 0 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
78 $ hg --traceback --config patch.eol='auto' import eol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
79 applying eol.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
80 $ cat a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
81 a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
82 yyyy |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
83 cc |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
84 |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
85 d |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
86 e (no-eol) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
87 $ hg st |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
88 |
8810
ac92775b3b80
Add patch.eol to ignore EOLs when patching (issue1019)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
89 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
90 auto EOL on CRLF file |
10102
1720d70cd6d4
patch: implement patch.eol=auto mode
Martin Geisler <mg@lazybytes.net>
parents:
8817
diff
changeset
|
91 |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
92 $ $PYTHON -c 'file("a", "wb").write("a\r\nbbb\r\ncc\r\n\r\nd\r\ne")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
93 $ hg commit -m 'switch EOLs in a' |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
94 $ hg --traceback --config patch.eol='auto' import eol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
95 applying eol.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
96 $ cat a |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
97 a\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
98 yyyy\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
99 cc\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
100 \r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
101 d\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
102 e (no-eol) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
103 $ hg st |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
104 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
105 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
106 auto EOL on new file or source without any EOL |
10102
1720d70cd6d4
patch: implement patch.eol=auto mode
Martin Geisler <mg@lazybytes.net>
parents:
8817
diff
changeset
|
107 |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
108 $ $PYTHON -c 'file("noeol", "wb").write("noeol")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
109 $ hg add noeol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
110 $ hg commit -m 'add noeol' |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
111 $ $PYTHON -c 'file("noeol", "wb").write("noeol\r\nnoeol\n")' |
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
112 $ $PYTHON -c 'file("neweol", "wb").write("neweol\nneweol\r\n")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
113 $ hg add neweol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
114 $ hg diff --git > noeol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
115 $ hg revert --no-backup noeol neweol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
116 $ rm neweol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
117 $ hg --traceback --config patch.eol='auto' import -m noeol noeol.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
118 applying noeol.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
119 $ cat noeol |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
120 noeol\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
121 noeol |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
122 $ cat neweol |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
123 neweol |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
124 neweol\r (esc) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
125 $ hg st |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
126 |
10127
d8214e944b84
patch: fix eolmode=auto with new files
Patrick Mezard <pmezard@gmail.com>
parents:
10102
diff
changeset
|
127 |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
128 Test --eol and binary patches |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
129 |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
130 $ $PYTHON -c 'file("b", "wb").write("a\x00\nb\r\nd")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
131 $ hg ci -Am addb |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
132 adding b |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
12943
diff
changeset
|
133 $ $PYTHON -c 'file("b", "wb").write("a\x00\nc\r\nd")' |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
134 $ hg diff --git > bin.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
135 $ hg revert --no-backup b |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
136 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
137 binary patch with --eol |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
138 |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
139 $ hg import --config patch.eol='CRLF' -m changeb bin.diff |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
140 applying bin.diff |
12943
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
141 $ cat b |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
142 a\x00 (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
143 c\r (esc) |
7439ea4146f8
tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents:
12316
diff
changeset
|
144 d (no-eol) |
11808
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
145 $ hg st |
3f6cf4cb3dca
tests: unify test-qimport-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10130
diff
changeset
|
146 $ cd .. |