annotate tests/test-eol-patch.t @ 49413:b380583ad2f5

perf-bundle: accept --type argument
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 11 Jul 2022 23:30:24 +0200
parents 43b3b761d9d1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
1 Test EOL patching
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
2
13519
43b3b761d9d1 tests: don't overwrite HGRCPATH
Martin Geisler <mg@aragost.com>
parents: 12943
diff changeset
3 $ cat >> $HGRCPATH <<EOF
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
4 > [diff]
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
5 > git = 1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
6 > EOF
11249
0bb67503ad4b eol: extension for managing file EOLs
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
7
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
8 Set up helpers
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
9
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
10 $ seteol () {
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
11 > if [ $1 = "LF" ]; then
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
12 > EOL='\n'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
13 > else
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
14 > EOL='\r\n'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
15 > fi
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
16 > }
11249
0bb67503ad4b eol: extension for managing file EOLs
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
17
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
18 $ makerepo () {
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
19 > seteol $1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
20 > echo
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
21 > echo "# ==== setup $1 repository ===="
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
22 > echo '% hg init'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
23 > hg init repo
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
24 > cd repo
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
25 > cat > .hgeol <<EOF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
26 > [repository]
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
27 > native = $1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
28 > [patterns]
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
29 > unix.txt = LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
30 > win.txt = CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
31 > **.txt = native
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
32 > EOF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
33 > printf "first\r\nsecond\r\nthird\r\n" > win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
34 > printf "first\nsecond\nthird\n" > unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
35 > printf "first${EOL}second${EOL}third${EOL}" > native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
36 > hg commit --addremove -m 'checkin'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
37 > cd ..
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
38 > }
11249
0bb67503ad4b eol: extension for managing file EOLs
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
39
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
40 $ dotest () {
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
41 > seteol $1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
42 > echo
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
43 > echo "% hg clone repo repo-$1"
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
44 > hg clone --noupdate repo repo-$1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
45 > cd repo-$1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
46 > cat > .hg/hgrc <<EOF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
47 > [extensions]
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
48 > eol =
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
49 > [eol]
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
50 > native = $1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
51 > EOF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
52 > hg update
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
53 > echo '% native.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
54 > cat native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
55 > echo '% unix.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
56 > cat unix.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
57 > echo '% win.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
58 > cat win.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
59 > printf "first${EOL}third${EOL}" > native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
60 > printf "first\r\nthird\r\n" > win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
61 > printf "first\nthird\n" > unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
62 > echo '% hg diff'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
63 > hg diff > p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
64 > cat p
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
65 > echo '% hg revert'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
66 > hg revert --all
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
67 > echo '% hg import'
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
68 > hg import -m 'patch' p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
69 > echo '% native.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
70 > cat native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
71 > echo '% unix.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
72 > cat unix.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
73 > echo '% win.txt'
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
74 > cat win.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
75 > echo '% hg diff -c tip'
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
76 > hg diff -c tip
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
77 > cd ..
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
78 > rm -r repo-$1
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
79 > }
11249
0bb67503ad4b eol: extension for managing file EOLs
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
80
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
81 Run tests
11249
0bb67503ad4b eol: extension for managing file EOLs
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
82
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
83 $ makerepo LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
84
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
85 # ==== setup LF repository ====
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
86 % hg init
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
87 adding .hgeol
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
88 adding native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
89 adding unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
90 adding win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
91 $ dotest LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
92
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
93 % hg clone repo repo-LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
94 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
95 % native.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
96 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
97 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
98 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
99 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
100 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
101 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
102 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
103 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
104 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
105 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
106 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
107 % hg diff
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
108 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
109 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
110 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
111 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
112 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
113 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
114 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
115 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
116 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
117 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
118 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
119 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
120 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
121 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
122 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
123 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
124 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
125 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
126 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
127 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
128 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
129 % hg revert
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
130 reverting native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
131 reverting unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
132 reverting win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
133 % hg import
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
134 applying p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
135 % native.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
136 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
137 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
138 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
139 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
140 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
141 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
142 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
143 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
144 % hg diff -c tip
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
145 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
146 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
147 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
148 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
149 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
150 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
151 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
152 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
153 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
154 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
155 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
156 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
157 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
158 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
159 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
160 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
161 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
162 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
163 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
164 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
165 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
166 $ dotest CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
167
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
168 % hg clone repo repo-CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
169 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
170 % native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
171 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
172 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
173 third\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
174 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
175 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
176 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
177 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
178 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
179 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
180 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
181 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
182 % hg diff
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
183 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
184 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
185 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
186 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
187 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
188 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
189 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
190 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
191 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
192 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
193 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
194 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
195 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
196 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
197 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
198 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
199 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
200 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
201 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
202 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
203 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
204 % hg revert
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
205 reverting native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
206 reverting unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
207 reverting win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
208 % hg import
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
209 applying p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
210 % native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
211 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
212 third\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
213 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
214 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
215 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
216 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
217 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
218 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
219 % hg diff -c tip
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
220 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
221 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
222 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
223 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
224 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
225 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
226 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
227 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
228 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
229 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
230 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
231 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
232 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
233 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
234 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
235 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
236 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
237 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
238 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
239 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
240 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
241 $ rm -r repo
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
242 $ makerepo CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
243
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
244 # ==== setup CRLF repository ====
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
245 % hg init
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
246 adding .hgeol
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
247 adding native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
248 adding unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
249 adding win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
250 $ dotest LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
251
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
252 % hg clone repo repo-LF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
253 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
254 % native.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
255 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
256 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
257 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
258 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
259 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
260 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
261 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
262 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
263 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
264 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
265 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
266 % hg diff
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
267 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
268 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
269 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
270 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
271 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
272 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
273 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
274 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
275 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
276 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
277 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
278 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
279 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
280 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
281 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
282 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
283 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
284 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
285 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
286 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
287 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
288 % hg revert
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
289 reverting native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
290 reverting unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
291 reverting win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
292 % hg import
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
293 applying p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
294 % native.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
295 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
296 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
297 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
298 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
299 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
300 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
301 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
302 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
303 % hg diff -c tip
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
304 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
305 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
306 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
307 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
308 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
309 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
310 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
311 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
312 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
313 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
314 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
315 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
316 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
317 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
318 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
319 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
320 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
321 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
322 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
323 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
324 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
325 $ dotest CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
326
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
327 % hg clone repo repo-CRLF
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
328 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
329 % native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
330 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
331 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
332 third\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
333 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
334 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
335 second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
336 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
337 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
338 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
339 second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
340 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
341 % hg diff
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
342 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
343 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
344 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
345 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
346 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
347 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
348 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
349 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
350 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
351 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
352 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
353 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
354 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
355 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
356 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
357 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
358 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
359 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
360 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
361 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
362 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
363 % hg revert
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
364 reverting native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
365 reverting unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
366 reverting win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
367 % hg import
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
368 applying p
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
369 % native.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
370 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
371 third\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
372 % unix.txt
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
373 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
374 third
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
375 % win.txt
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
376 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
377 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
378 % hg diff -c tip
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
379 diff --git a/native.txt b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
380 --- a/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
381 +++ b/native.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
382 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
383 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
384 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
385 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
386 diff --git a/unix.txt b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
387 --- a/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
388 +++ b/unix.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
389 @@ -1,3 +1,2 @@
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
390 first
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
391 -second
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
392 third
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
393 diff --git a/win.txt b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
394 --- a/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
395 +++ b/win.txt
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
396 @@ -1,3 +1,2 @@
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
397 first\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
398 -second\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12420
diff changeset
399 third\r (esc)
12420
e9db6bc37659 tests: unify test-eol-patch
Matt Mackall <mpm@selenic.com>
parents: 11249
diff changeset
400 $ rm -r repo