Mercurial > hg
annotate tests/test-mq-eol.t @ 35184:bc775b8cc020
scmutil: extra utility to display a reasonable amount of nodes
Push have some logic to display a reasonable amount nodes. We extract it to an
utility function to make it reusable.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 16 Nov 2017 03:52:38 +0100 |
parents | 24849d53697d |
children | 1dbd8a62b581 |
rev | line source |
---|---|
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
1 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
2 Test interactions between mq and patch.eol |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
3 |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
5 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
6 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
7 > mq = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
8 > [diff] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
9 > nodates = 1 |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22947
diff
changeset
|
10 > EOF |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
12 $ cat > makepatch.py <<EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
13 > f = file('eol.diff', 'wb') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
14 > w = f.write |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
15 > w('test message\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
16 > w('diff --git a/a b/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
17 > w('--- a/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
18 > w('+++ b/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
19 > w('@@ -1,5 +1,5 @@\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
20 > w(' a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
21 > w('-b\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
22 > w('+y\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
23 > w(' c\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
24 > w(' d\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
25 > w('-e\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
26 > w('\ No newline at end of file\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
27 > w('+z\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
28 > w('\ No newline at end of file\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
29 > EOF |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
31 $ cat > cateol.py <<EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
32 > import sys |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
33 > for line in file(sys.argv[1], 'rb'): |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
34 > line = line.replace('\r', '<CR>') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
35 > line = line.replace('\n', '<LF>') |
33721
24849d53697d
tests: clean up many print statements to be print functions instead
Augie Fackler <augie@google.com>
parents:
32940
diff
changeset
|
36 > print(line) |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
37 > EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
38 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
39 $ hg init repo |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
40 $ cd repo |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
41 $ echo '\.diff' > .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
42 $ echo '\.rej' >> .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
43 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
44 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
45 Test different --eol values |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
46 |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22545
diff
changeset
|
47 $ $PYTHON -c 'file("a", "wb").write("a\nb\nc\nd\ne")' |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
48 $ hg ci -Am adda |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
49 adding .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
50 adding a |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
26780
diff
changeset
|
51 $ $PYTHON ../makepatch.py |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
52 $ hg qimport eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
53 adding eol.diff to series file |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
54 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
55 should fail in strict mode |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
56 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
57 $ hg qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
58 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
59 patching file a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
60 Hunk #1 FAILED at 0 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
61 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
62 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
23172
diff
changeset
|
63 patch failed, rejects left in working directory |
26780 | 64 errors during apply, please fix and qrefresh eol.diff |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11895
diff
changeset
|
65 [2] |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
66 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
67 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
68 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
69 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
70 invalid eol |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
71 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
72 $ hg --config patch.eol='LFCR' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
73 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
74 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
23172
diff
changeset
|
75 patch failed, rejects left in working directory |
26780 | 76 errors during apply, please fix and qrefresh eol.diff |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11895
diff
changeset
|
77 [2] |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
78 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
79 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
80 patch queue now empty |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
81 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
82 force LF |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
83 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
84 $ hg --config patch.eol='CRLF' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
85 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
86 now at: eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
87 $ hg qrefresh |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
26780
diff
changeset
|
88 $ $PYTHON ../cateol.py .hg/patches/eol.diff |
22545
6a2cfa61acb0
mq: upgrade non-plain patches to HG format when setting parent in patchheader
Mads Kiilerich <madski@unity3d.com>
parents:
13100
diff
changeset
|
89 # HG changeset patch<LF> |
6a2cfa61acb0
mq: upgrade non-plain patches to HG format when setting parent in patchheader
Mads Kiilerich <madski@unity3d.com>
parents:
13100
diff
changeset
|
90 # Parent 0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF> |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
91 test message<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
92 <LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
93 diff -r 0d0bf99a8b7a a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
94 --- a/a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
95 +++ b/a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
96 @@ -1,5 +1,5 @@<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
97 -a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
98 -b<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
99 -c<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
100 -d<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
101 -e<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
102 \ No newline at end of file<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
103 +a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
104 +y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
105 +c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
106 +d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
107 +z<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
108 \ No newline at end of file<LF> |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
26780
diff
changeset
|
109 $ $PYTHON ../cateol.py a |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
110 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
111 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
112 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
113 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
114 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
115 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
116 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
117 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
118 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
119 push again forcing LF and compare revisions |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
120 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
121 $ hg --config patch.eol='CRLF' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
122 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
123 now at: eol.diff |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
26780
diff
changeset
|
124 $ $PYTHON ../cateol.py a |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
125 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
126 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
127 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
128 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
129 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
130 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
131 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
132 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
133 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
134 push again without LF and compare revisions |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
135 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
136 $ hg qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
137 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
138 now at: eol.diff |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
26780
diff
changeset
|
139 $ $PYTHON ../cateol.py a |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
140 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
141 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
142 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
143 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
144 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
145 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
146 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
147 patch queue now empty |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
148 $ cd .. |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
149 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
150 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
151 Test .rej file EOL are left unchanged |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
152 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
153 $ hg init testeol |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
154 $ cd testeol |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22545
diff
changeset
|
155 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')" |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
156 $ hg ci -Am adda |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
157 adding a |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22545
diff
changeset
|
158 $ $PYTHON -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')" |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
159 $ hg qnew patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
160 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
161 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
162 patch queue now empty |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22545
diff
changeset
|
163 $ $PYTHON -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')" |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
164 $ hg ci -m changea |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
165 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
166 $ hg --config 'patch.eol=LF' qpush |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
167 applying patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
168 patching file a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
169 Hunk #1 FAILED at 0 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
170 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
171 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
23172
diff
changeset
|
172 patch failed, rejects left in working directory |
26780 | 173 errors during apply, please fix and qrefresh patch1 |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
174 [2] |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
175 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
176 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
177 patch queue now empty |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
178 $ cat a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
179 --- a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
180 +++ a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
181 @@ -1,4 +1,4 @@ |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
182 1\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
183 2\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
184 -3\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
185 +33\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
186 4 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
187 \ No newline at end of file |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
188 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
189 $ hg --config 'patch.eol=auto' qpush |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
190 applying patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
191 patching file a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
192 Hunk #1 FAILED at 0 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
193 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
194 patch failed, unable to continue (try -v) |
24365
f1eaf03dd608
commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org>
parents:
23172
diff
changeset
|
195 patch failed, rejects left in working directory |
26780 | 196 errors during apply, please fix and qrefresh patch1 |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
197 [2] |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
198 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
199 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
200 patch queue now empty |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
201 $ cat a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
202 --- a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
203 +++ a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
204 @@ -1,4 +1,4 @@ |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
205 1\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
206 2\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
207 -3\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
208 +33\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
209 4 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
210 \ No newline at end of file |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
211 $ cd .. |