equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 |
|
3 cat > $HGRCPATH <<EOF |
|
4 [diff] |
|
5 git = True |
|
6 EOF |
|
7 |
|
8 hg init main |
|
9 cat > main/.hg/hgrc <<EOF |
|
10 [extensions] |
|
11 eol = |
|
12 |
|
13 [hooks] |
|
14 pretxnchangegroup = python:hgext.eol.hook |
|
15 EOF |
|
16 |
|
17 hg clone main fork |
|
18 |
|
19 cd fork |
|
20 cat > .hgeol <<EOF |
|
21 [patterns] |
|
22 mixed.txt = BIN |
|
23 **.txt = native |
|
24 EOF |
|
25 |
|
26 hg add .hgeol |
|
27 hg commit -m 'Commit .hgeol' |
|
28 |
|
29 printf "first\nsecond\nthird\n" > a.txt |
|
30 hg add a.txt |
|
31 echo "% hg commit (LF a.txt)" |
|
32 hg commit -m 'LF a.txt' |
|
33 echo "% hg push" |
|
34 hg push ../main |
|
35 |
|
36 printf "first\r\nsecond\r\nthird\n" > a.txt |
|
37 echo "% hg commit (CRLF a.txt)" |
|
38 hg commit -m 'CRLF a.txt' |
|
39 echo "% hg push" |
|
40 hg push ../main |
|
41 |
|
42 |
|
43 echo "% hg commit (LF a.txt)" |
|
44 printf "first\nsecond\nthird\n" > a.txt |
|
45 hg commit -m 'LF a.txt (fixed)' |
|
46 echo "% hg push" |
|
47 hg push ../main |
|