Mercurial > hg
comparison tests/test-eol-clone @ 11249:0bb67503ad4b stable
eol: extension for managing file EOLs
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 31 May 2010 21:37:01 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11246:8f5ad12db28e | 11249:0bb67503ad4b |
---|---|
1 #!/bin/sh | |
2 | |
3 cat > $HGRCPATH <<EOF | |
4 [diff] | |
5 git = True | |
6 | |
7 [extensions] | |
8 eol = | |
9 | |
10 [eol] | |
11 native = CRLF | |
12 EOF | |
13 | |
14 echo "% setup repository" | |
15 hg init repo | |
16 cd repo | |
17 | |
18 cat > .hgeol <<EOF | |
19 [patterns] | |
20 **.txt = native | |
21 EOF | |
22 | |
23 printf "first\r\nsecond\r\nthird\r\n" > a.txt | |
24 hg commit --addremove -m 'checkin' | |
25 cd .. | |
26 | |
27 echo "% hg clone repo repo-2" | |
28 hg clone repo repo-2 | |
29 cd repo-2 | |
30 | |
31 echo '% printrepr.py a.txt' | |
32 python $TESTDIR/printrepr.py < a.txt | |
33 echo '% hg cat a.txt' | |
34 hg cat a.txt | python $TESTDIR/printrepr.py | |
35 | |
36 hg remove .hgeol | |
37 hg commit -m 'remove eol' | |
38 hg push --quiet | |
39 | |
40 cd .. | |
41 | |
42 # Test clone of repo with .hgeol in working dir, but no .hgeol in tip | |
43 echo "% hg clone repo repo-3" | |
44 hg clone repo repo-3 | |
45 cd repo-3 | |
46 | |
47 echo '% printrepr.py a.txt' | |
48 python $TESTDIR/printrepr.py < a.txt | |
49 | |
50 cd .. | |
51 | |
52 # Test clone of revision with .hgeol | |
53 echo "% hg clone -r 1 repo repo-4" | |
54 hg clone -r 0 repo repo-4 | |
55 cd repo-4 | |
56 | |
57 echo '% cat .hgeol' | |
58 cat .hgeol | |
59 | |
60 echo '% printrepr.py a.txt' | |
61 python $TESTDIR/printrepr.py < a.txt | |
62 | |
63 cd .. |