annotate tests/test-mq-eol.t @ 42704:6957f7b93e03

unshelve: clear shelvedstate and _finishunshelve() on partial unshelve On a partial unshelve, `shelvedstate` was not cleared and `_finishunshelve()` was not called. Ideally, these should be called on this case. This patch makes `shelvedstate` to delete after a successful partial unshelve and calls `_finishunshelve()` in the same case. Differential Revision: https://phab.mercurial-scm.org/D6708
author Navaneeth Suresh <navaneeths1998@gmail.com>
date Sat, 27 Jul 2019 12:19:51 +0530
parents 140b542b0e59
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
35945
1dbd8a62b581 py3: use open() instead of file()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33721
diff changeset
13 > f = open('eol.diff', 'wb')
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
14 > w = f.write
36283
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
15 > w(b'test message\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
16 > w(b'diff --git a/a b/a\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
17 > w(b'--- a/a\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
18 > w(b'+++ b/a\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
19 > w(b'@@ -1,5 +1,5 @@\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
20 > w(b' a\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
21 > w(b'-b\r\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
22 > w(b'+y\r\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
23 > w(b' c\r\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
24 > w(b' d\n')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
25 > w(b'-e\n')
41707
140b542b0e59 tests: double escape \ in test-import-eol.t and test-mq-eol.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41550
diff changeset
26 > w(b'\\\\ No newline at end of file\n')
36283
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
27 > w(b'+z\r\n')
41707
140b542b0e59 tests: double escape \ in test-import-eol.t and test-mq-eol.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41550
diff changeset
28 > w(b'\\\\ No newline at end of file\r\n')
11895
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
41329
84707d9e77a0 tests: write directly to stdout to avoid b'' prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39707
diff changeset
33 > try:
84707d9e77a0 tests: write directly to stdout to avoid b'' prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39707
diff changeset
34 > stdout = sys.stdout.buffer
84707d9e77a0 tests: write directly to stdout to avoid b'' prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39707
diff changeset
35 > except AttributeError:
84707d9e77a0 tests: write directly to stdout to avoid b'' prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39707
diff changeset
36 > stdout = sys.stdout
35945
1dbd8a62b581 py3: use open() instead of file()
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33721
diff changeset
37 > for line in open(sys.argv[1], 'rb'):
36283
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
38 > line = line.replace(b'\r', b'<CR>')
a67b144ef74f py3: add b'' prefixes in test-mq-eol.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35945
diff changeset
39 > line = line.replace(b'\n', b'<LF>')
41329
84707d9e77a0 tests: write directly to stdout to avoid b'' prefixes
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39707
diff changeset
40 > stdout.write(line + b'\n')
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
41 > EOF
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
42
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
43 $ hg init repo
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
44 $ cd repo
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
45 $ echo '\.diff' > .hgignore
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
46 $ echo '\.rej' >> .hgignore
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
47
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
48
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
49 Test different --eol values
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
50
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
51 $ "$PYTHON" -c 'open("a", "wb").write(b"a\nb\nc\nd\ne")'
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
52 $ hg ci -Am adda
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
53 adding .hgignore
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
54 adding a
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
55 $ "$PYTHON" ../makepatch.py
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
56 $ hg qimport eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
57 adding eol.diff to series file
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
58
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
59 should fail in strict mode
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
60
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
61 $ hg qpush
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
62 applying eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
63 patching file a
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
64 Hunk #1 FAILED at 0
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
65 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
66 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
67 patch failed, rejects left in working directory
26780
bbf544b5f2e9 mq: consistently use qrefresh
timeless@mozdev.org
parents: 24365
diff changeset
68 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
69 [2]
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
70 $ hg qpop
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
71 popping eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
72 patch queue now empty
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
73
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
74 invalid eol
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
75
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
76 $ hg --config patch.eol='LFCR' qpush
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
77 applying eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
78 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
79 patch failed, rejects left in working directory
26780
bbf544b5f2e9 mq: consistently use qrefresh
timeless@mozdev.org
parents: 24365
diff changeset
80 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
81 [2]
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
82 $ hg qpop
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
83 popping eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
84 patch queue now empty
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
85
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
86 force LF
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
87
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
88 $ hg --config patch.eol='CRLF' qpush
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
89 applying eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
90 now at: eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
91 $ hg qrefresh
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
92 $ "$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
93 # 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
94 # Parent 0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF>
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
95 test message<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
96 <LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
97 diff -r 0d0bf99a8b7a a<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
98 --- a/a<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
99 +++ b/a<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
100 @@ -1,5 +1,5 @@<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
101 -a<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
102 -b<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
103 -c<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
104 -d<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
105 -e<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
106 \ No newline at end of file<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
107 +a<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
108 +y<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
109 +c<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
110 +d<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
111 +z<LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
112 \ No newline at end of file<LF>
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
113 $ "$PYTHON" ../cateol.py a
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
114 a<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
115 y<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
116 c<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
117 d<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
118 z
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
119 $ hg qpop
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
120 popping eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
121 patch queue now empty
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
122
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
123 push again forcing LF and compare revisions
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
124
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
125 $ hg --config patch.eol='CRLF' qpush
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
126 applying eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
127 now at: eol.diff
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
128 $ "$PYTHON" ../cateol.py a
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
129 a<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
130 y<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
131 c<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
132 d<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
133 z
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
134 $ hg qpop
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
135 popping eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
136 patch queue now empty
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
137
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
138 push again without LF and compare revisions
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
139
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
140 $ hg qpush
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
141 applying eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
142 now at: eol.diff
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
143 $ "$PYTHON" ../cateol.py a
11895
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
144 a<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
145 y<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
146 c<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
147 d<CR><LF>
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
148 z
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
149 $ hg qpop
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
150 popping eol.diff
78e3a70c4445 tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10190
diff changeset
151 patch queue now empty
13100
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
152 $ cd ..
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
153
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
154
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
155 Test .rej file EOL are left unchanged
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
156
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
157 $ hg init testeol
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
158 $ cd testeol
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
159 $ "$PYTHON" -c "open('a', 'wb').write(b'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
160 $ hg ci -Am adda
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
161 adding a
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
162 $ "$PYTHON" -c "open('a', 'wb').write(b'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
163 $ hg qnew patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
164 $ hg qpop
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
165 popping patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
166 patch queue now empty
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 36283
diff changeset
167 $ "$PYTHON" -c "open('a', 'wb').write(b'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
168 $ hg ci -m changea
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
169
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
170 $ hg --config 'patch.eol=LF' qpush
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
171 applying patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
172 patching file a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
173 Hunk #1 FAILED at 0
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
174 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
175 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
176 patch failed, rejects left in working directory
26780
bbf544b5f2e9 mq: consistently use qrefresh
timeless@mozdev.org
parents: 24365
diff changeset
177 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
178 [2]
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
179 $ hg qpop
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
180 popping patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
181 patch queue now empty
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
182 $ cat a.rej
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
183 --- a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
184 +++ a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
185 @@ -1,4 +1,4 @@
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
186 1\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
187 2\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
188 -3\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
189 +33\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
190 4
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
191 \ No newline at end of file
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
192
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
193 $ hg --config 'patch.eol=auto' qpush
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
194 applying patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
195 patching file a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
196 Hunk #1 FAILED at 0
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
197 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
198 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
199 patch failed, rejects left in working directory
26780
bbf544b5f2e9 mq: consistently use qrefresh
timeless@mozdev.org
parents: 24365
diff changeset
200 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
201 [2]
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
202 $ hg qpop
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
203 popping patch1
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
204 patch queue now empty
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
205 $ cat a.rej
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
206 --- a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
207 +++ a
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
208 @@ -1,4 +1,4 @@
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
209 1\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
210 2\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
211 -3\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
212 +33\r (esc)
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
213 4
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
214 \ No newline at end of file
66d7a1250c9b patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents: 12316
diff changeset
215 $ cd ..