##// END OF EJS Templates
tests: unify test-eol-clone
Matt Mackall -
r12422:4263359f default
parent child Browse files
Show More
@@ -1,63 +1,78 b''
1 #!/bin/sh
1 Testing cloning with the EOL extension
2
3 cat > $HGRCPATH <<EOF
4 [diff]
5 git = True
6
2
7 [extensions]
3 $ cat > $HGRCPATH <<EOF
8 eol =
4 > [diff]
9
5 > git = True
10 [eol]
6 >
11 native = CRLF
7 > [extensions]
12 EOF
8 > eol =
9 >
10 > [eol]
11 > native = CRLF
12 > EOF
13
13
14 echo "% setup repository"
14 setup repository
15 hg init repo
16 cd repo
17
15
18 cat > .hgeol <<EOF
16 $ hg init repo
19 [patterns]
17 $ cd repo
20 **.txt = native
18 $ cat > .hgeol <<EOF
21 EOF
19 > [patterns]
20 > **.txt = native
21 > EOF
22 $ printf "first\r\nsecond\r\nthird\r\n" > a.txt
23 $ hg commit --addremove -m 'checkin'
24 adding .hgeol
25 adding a.txt
22
26
23 printf "first\r\nsecond\r\nthird\r\n" > a.txt
27 Clone
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
28
31 echo '% printrepr.py a.txt'
29 $ cd ..
32 python $TESTDIR/printrepr.py < a.txt
30 $ hg clone repo repo-2
33 echo '% hg cat a.txt'
31 updating to branch default
34 hg cat a.txt | python $TESTDIR/printrepr.py
32 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 $ cd repo-2
34 $ python $TESTDIR/printrepr.py < a.txt
35 first\r
36 second\r
37 third\r
38 $ hg cat a.txt | python $TESTDIR/printrepr.py
39 first
40 second
41 third
42 $ hg remove .hgeol
43 $ hg commit -m 'remove eol'
44 $ hg push --quiet
45 $ cd ..
35
46
36 hg remove .hgeol
47 Test clone of repo with .hgeol in working dir, but no .hgeol in tip
37 hg commit -m 'remove eol'
38 hg push --quiet
39
48
40 cd ..
49 $ hg clone repo repo-3
41
50 updating to branch default
42 # Test clone of repo with .hgeol in working dir, but no .hgeol in tip
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 echo "% hg clone repo repo-3"
52 $ cd repo-3
44 hg clone repo repo-3
45 cd repo-3
46
53
47 echo '% printrepr.py a.txt'
54 $ python $TESTDIR/printrepr.py < a.txt
48 python $TESTDIR/printrepr.py < a.txt
55 first
56 second
57 third
49
58
50 cd ..
59 Test clone of revision with .hgeol
51
60
52 # Test clone of revision with .hgeol
61 $ cd ..
53 echo "% hg clone -r 1 repo repo-4"
62 $ hg clone -r 0 repo repo-4
54 hg clone -r 0 repo repo-4
63 requesting all changes
55 cd repo-4
64 adding changesets
65 adding manifests
66 adding file changes
67 added 1 changesets with 2 changes to 2 files
68 updating to branch default
69 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 $ cd repo-4
71 $ cat .hgeol
72 [patterns]
73 **.txt = native
56
74
57 echo '% cat .hgeol'
75 $ python $TESTDIR/printrepr.py < a.txt
58 cat .hgeol
76 first\r
59
77 second\r
60 echo '% printrepr.py a.txt'
78 third\r
61 python $TESTDIR/printrepr.py < a.txt
62
63 cd ..
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now