Mercurial > hg
annotate tests/test-mq-eol.t @ 22902:ce0592328d68
merge: add merge.graft helper
This will help unify all the open-coded graft/rebase operations.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Oct 2014 17:12:12 -0500 |
parents | 6a2cfa61acb0 |
children | c63a09b6b337 |
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 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
5 $ echo "[extensions]" >> $HGRCPATH |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
6 $ echo "mq=" >> $HGRCPATH |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
7 $ echo "[diff]" >> $HGRCPATH |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
8 $ echo "nodates=1" >> $HGRCPATH |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
10 $ cat > makepatch.py <<EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
11 > f = file('eol.diff', 'wb') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
12 > w = f.write |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
13 > w('test message\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
14 > w('diff --git a/a b/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
15 > w('--- a/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
16 > w('+++ b/a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
17 > w('@@ -1,5 +1,5 @@\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
18 > w(' a\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
19 > w('-b\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
20 > w('+y\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
21 > w(' c\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
22 > w(' d\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
23 > w('-e\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
24 > w('\ No newline at end of file\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
25 > w('+z\r\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\r\n') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
27 > EOF |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
29 $ cat > cateol.py <<EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
30 > import sys |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
31 > for line in file(sys.argv[1], 'rb'): |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
32 > line = line.replace('\r', '<CR>') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
33 > line = line.replace('\n', '<LF>') |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
34 > print line |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
35 > EOF |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
36 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
37 $ hg init repo |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
38 $ cd repo |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
39 $ echo '\.diff' > .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
40 $ echo '\.rej' >> .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
41 |
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 Test different --eol values |
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 $ python -c 'file("a", "wb").write("a\nb\nc\nd\ne")' |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
46 $ hg ci -Am adda |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
47 adding .hgignore |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
48 adding a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
49 $ python ../makepatch.py |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
50 $ hg qimport eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
51 adding eol.diff to series file |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
52 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
53 should fail in strict mode |
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 $ hg qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
56 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
57 patching file a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
58 Hunk #1 FAILED at 0 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
59 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
|
60 patch failed, unable to continue (try -v) |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
61 patch failed, rejects left in working dir |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
62 errors during apply, please fix and refresh eol.diff |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11895
diff
changeset
|
63 [2] |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
64 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
65 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
66 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
67 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
68 invalid eol |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
69 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
70 $ hg --config patch.eol='LFCR' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
71 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
72 patch failed, unable to continue (try -v) |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
73 patch failed, rejects left in working dir |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
74 errors during apply, please fix and refresh eol.diff |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11895
diff
changeset
|
75 [2] |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
76 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
77 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
78 patch queue now empty |
8811
8b35b08724eb
Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
79 |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
80 force LF |
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 $ hg --config patch.eol='CRLF' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
83 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
84 now at: eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
85 $ hg qrefresh |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
86 $ 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
|
87 # 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
|
88 # Parent 0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF> |
11895
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
89 test message<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
90 <LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
91 diff -r 0d0bf99a8b7a a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
92 --- a/a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
93 +++ b/a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
94 @@ -1,5 +1,5 @@<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
95 -a<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
96 -b<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
97 -c<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
98 -d<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
99 -e<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
100 \ No newline at end of file<LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
101 +a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
102 +y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
103 +c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
104 +d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
105 +z<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 $ python ../cateol.py a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
108 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
109 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
110 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
111 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
112 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
113 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
114 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
115 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
116 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
117 push again forcing LF and compare revisions |
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 $ hg --config patch.eol='CRLF' qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
120 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
121 now at: eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
122 $ python ../cateol.py a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
123 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
124 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
125 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
126 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
127 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
128 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
129 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
130 patch queue now empty |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
131 |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
132 push again without LF and compare revisions |
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 $ hg qpush |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
135 applying eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
136 now at: eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
137 $ python ../cateol.py a |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
138 a<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
139 y<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
140 c<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
141 d<CR><LF> |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
142 z |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
143 $ hg qpop |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
144 popping eol.diff |
78e3a70c4445
tests: unify test-mq-eol
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10190
diff
changeset
|
145 patch queue now empty |
13100
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
146 $ cd .. |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
147 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
148 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
149 Test .rej file EOL are left unchanged |
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 $ hg init testeol |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
152 $ cd testeol |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
153 $ python -c "file('a', 'wb').write('1\r\n2\r\n3\r\n4')" |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
154 $ hg ci -Am adda |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
155 adding a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
156 $ python -c "file('a', 'wb').write('1\r\n2\r\n33\r\n4')" |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
157 $ hg qnew patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
158 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
159 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
160 patch queue now empty |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
161 $ python -c "file('a', 'wb').write('1\r\n22\r\n33\r\n4')" |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
162 $ hg ci -m changea |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
163 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
164 $ hg --config 'patch.eol=LF' qpush |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
165 applying patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
166 patching file a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
167 Hunk #1 FAILED at 0 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
168 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
|
169 patch failed, unable to continue (try -v) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
170 patch failed, rejects left in working dir |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
171 errors during apply, please fix and refresh patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
172 [2] |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
173 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
174 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
175 patch queue now empty |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
176 $ cat a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
177 --- a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
178 +++ a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
179 @@ -1,4 +1,4 @@ |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
180 1\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
181 2\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
182 -3\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
183 +33\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
184 4 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
185 \ No newline at end of file |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
186 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
187 $ hg --config 'patch.eol=auto' qpush |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
188 applying patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
189 patching file a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
190 Hunk #1 FAILED at 0 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
191 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
|
192 patch failed, unable to continue (try -v) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
193 patch failed, rejects left in working dir |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
194 errors during apply, please fix and refresh patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
195 [2] |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
196 $ hg qpop |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
197 popping patch1 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
198 patch queue now empty |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
199 $ cat a.rej |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
200 --- a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
201 +++ a |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
202 @@ -1,4 +1,4 @@ |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
203 1\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
204 2\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
205 -3\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
206 +33\r (esc) |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
207 4 |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
208 \ No newline at end of file |
66d7a1250c9b
patch: write .rej files without rewriting EOLs
Patrick Mezard <pmezard@gmail.com>
parents:
12316
diff
changeset
|
209 $ cd .. |