Show More
@@ -1,77 +1,74 b'' | |||||
1 | Testing cloning with the EOL extension |
|
1 | Testing cloning with the EOL extension | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [diff] |
|
|||
5 | > git = True |
|
|||
6 | > |
|
|||
7 | > [extensions] |
|
4 | > [extensions] | |
8 | > eol = |
|
5 | > eol = | |
9 | > |
|
6 | > | |
10 | > [eol] |
|
7 | > [eol] | |
11 | > native = CRLF |
|
8 | > native = CRLF | |
12 | > EOF |
|
9 | > EOF | |
13 |
|
10 | |||
14 | setup repository |
|
11 | setup repository | |
15 |
|
12 | |||
16 | $ hg init repo |
|
13 | $ hg init repo | |
17 | $ cd repo |
|
14 | $ cd repo | |
18 | $ cat > .hgeol <<EOF |
|
15 | $ cat > .hgeol <<EOF | |
19 | > [patterns] |
|
16 | > [patterns] | |
20 | > **.txt = native |
|
17 | > **.txt = native | |
21 | > EOF |
|
18 | > EOF | |
22 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt |
|
19 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt | |
23 | $ hg commit --addremove -m 'checkin' |
|
20 | $ hg commit --addremove -m 'checkin' | |
24 | adding .hgeol |
|
21 | adding .hgeol | |
25 | adding a.txt |
|
22 | adding a.txt | |
26 |
|
23 | |||
27 | Clone |
|
24 | Clone | |
28 |
|
25 | |||
29 | $ cd .. |
|
26 | $ cd .. | |
30 | $ hg clone repo repo-2 |
|
27 | $ hg clone repo repo-2 | |
31 | updating to branch default |
|
28 | updating to branch default | |
32 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | $ cd repo-2 |
|
30 | $ cd repo-2 | |
34 | $ cat a.txt |
|
31 | $ cat a.txt | |
35 | first\r (esc) |
|
32 | first\r (esc) | |
36 | second\r (esc) |
|
33 | second\r (esc) | |
37 | third\r (esc) |
|
34 | third\r (esc) | |
38 | $ hg cat a.txt |
|
35 | $ hg cat a.txt | |
39 | first |
|
36 | first | |
40 | second |
|
37 | second | |
41 | third |
|
38 | third | |
42 | $ hg remove .hgeol |
|
39 | $ hg remove .hgeol | |
43 | $ hg commit -m 'remove eol' |
|
40 | $ hg commit -m 'remove eol' | |
44 | $ hg push --quiet |
|
41 | $ hg push --quiet | |
45 | $ cd .. |
|
42 | $ cd .. | |
46 |
|
43 | |||
47 | Test clone of repo with .hgeol in working dir, but no .hgeol in tip |
|
44 | Test clone of repo with .hgeol in working dir, but no .hgeol in tip | |
48 |
|
45 | |||
49 | $ hg clone repo repo-3 |
|
46 | $ hg clone repo repo-3 | |
50 | updating to branch default |
|
47 | updating to branch default | |
51 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
52 | $ cd repo-3 |
|
49 | $ cd repo-3 | |
53 |
|
50 | |||
54 | $ cat a.txt |
|
51 | $ cat a.txt | |
55 | first |
|
52 | first | |
56 | second |
|
53 | second | |
57 | third |
|
54 | third | |
58 |
|
55 | |||
59 | Test clone of revision with .hgeol |
|
56 | Test clone of revision with .hgeol | |
60 |
|
57 | |||
61 | $ cd .. |
|
58 | $ cd .. | |
62 | $ hg clone -r 0 repo repo-4 |
|
59 | $ hg clone -r 0 repo repo-4 | |
63 | adding changesets |
|
60 | adding changesets | |
64 | adding manifests |
|
61 | adding manifests | |
65 | adding file changes |
|
62 | adding file changes | |
66 | added 1 changesets with 2 changes to 2 files |
|
63 | added 1 changesets with 2 changes to 2 files | |
67 | updating to branch default |
|
64 | updating to branch default | |
68 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 | $ cd repo-4 |
|
66 | $ cd repo-4 | |
70 | $ cat .hgeol |
|
67 | $ cat .hgeol | |
71 | [patterns] |
|
68 | [patterns] | |
72 | **.txt = native |
|
69 | **.txt = native | |
73 |
|
70 | |||
74 | $ cat a.txt |
|
71 | $ cat a.txt | |
75 | first\r (esc) |
|
72 | first\r (esc) | |
76 | second\r (esc) |
|
73 | second\r (esc) | |
77 | third\r (esc) |
|
74 | third\r (esc) |
@@ -1,90 +1,86 b'' | |||||
1 | Test the EOL hook |
|
1 | Test the EOL hook | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH <<EOF |
|
|||
4 | > [diff] |
|
|||
5 | > git = True |
|
|||
6 | > EOF |
|
|||
7 | $ hg init main |
|
3 | $ hg init main | |
8 | $ cat > main/.hg/hgrc <<EOF |
|
4 | $ cat > main/.hg/hgrc <<EOF | |
9 | > [extensions] |
|
5 | > [extensions] | |
10 | > eol = |
|
6 | > eol = | |
11 | > |
|
7 | > | |
12 | > [hooks] |
|
8 | > [hooks] | |
13 | > pretxnchangegroup = python:hgext.eol.hook |
|
9 | > pretxnchangegroup = python:hgext.eol.hook | |
14 | > EOF |
|
10 | > EOF | |
15 | $ hg clone main fork |
|
11 | $ hg clone main fork | |
16 | updating to branch default |
|
12 | updating to branch default | |
17 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | $ cd fork |
|
14 | $ cd fork | |
19 |
|
15 | |||
20 | Create repo |
|
16 | Create repo | |
21 | $ cat > .hgeol <<EOF |
|
17 | $ cat > .hgeol <<EOF | |
22 | > [patterns] |
|
18 | > [patterns] | |
23 | > mixed.txt = BIN |
|
19 | > mixed.txt = BIN | |
24 | > crlf.txt = CRLF |
|
20 | > crlf.txt = CRLF | |
25 | > **.txt = native |
|
21 | > **.txt = native | |
26 | > EOF |
|
22 | > EOF | |
27 | $ hg add .hgeol |
|
23 | $ hg add .hgeol | |
28 | $ hg commit -m 'Commit .hgeol' |
|
24 | $ hg commit -m 'Commit .hgeol' | |
29 |
|
25 | |||
30 | $ printf "first\nsecond\nthird\n" > a.txt |
|
26 | $ printf "first\nsecond\nthird\n" > a.txt | |
31 | $ hg add a.txt |
|
27 | $ hg add a.txt | |
32 | $ hg commit -m 'LF a.txt' |
|
28 | $ hg commit -m 'LF a.txt' | |
33 | $ hg push ../main |
|
29 | $ hg push ../main | |
34 | pushing to ../main |
|
30 | pushing to ../main | |
35 | searching for changes |
|
31 | searching for changes | |
36 | adding changesets |
|
32 | adding changesets | |
37 | adding manifests |
|
33 | adding manifests | |
38 | adding file changes |
|
34 | adding file changes | |
39 | added 2 changesets with 2 changes to 2 files |
|
35 | added 2 changesets with 2 changes to 2 files | |
40 |
|
36 | |||
41 | $ printf "first\r\nsecond\r\nthird\n" > a.txt |
|
37 | $ printf "first\r\nsecond\r\nthird\n" > a.txt | |
42 | $ hg commit -m 'CRLF a.txt' |
|
38 | $ hg commit -m 'CRLF a.txt' | |
43 | $ hg push ../main |
|
39 | $ hg push ../main | |
44 | pushing to ../main |
|
40 | pushing to ../main | |
45 | searching for changes |
|
41 | searching for changes | |
46 | adding changesets |
|
42 | adding changesets | |
47 | adding manifests |
|
43 | adding manifests | |
48 | adding file changes |
|
44 | adding file changes | |
49 | added 1 changesets with 1 changes to 1 files |
|
45 | added 1 changesets with 1 changes to 1 files | |
50 | error: pretxnchangegroup hook failed: a.txt should not have CRLF line endings |
|
46 | error: pretxnchangegroup hook failed: a.txt should not have CRLF line endings | |
51 | transaction abort! |
|
47 | transaction abort! | |
52 | rollback completed |
|
48 | rollback completed | |
53 | abort: a.txt should not have CRLF line endings |
|
49 | abort: a.txt should not have CRLF line endings | |
54 | [255] |
|
50 | [255] | |
55 |
|
51 | |||
56 | $ printf "first\nsecond\nthird\n" > a.txt |
|
52 | $ printf "first\nsecond\nthird\n" > a.txt | |
57 | $ hg commit -m 'LF a.txt (fixed)' |
|
53 | $ hg commit -m 'LF a.txt (fixed)' | |
58 | $ hg push ../main |
|
54 | $ hg push ../main | |
59 | pushing to ../main |
|
55 | pushing to ../main | |
60 | searching for changes |
|
56 | searching for changes | |
61 | adding changesets |
|
57 | adding changesets | |
62 | adding manifests |
|
58 | adding manifests | |
63 | adding file changes |
|
59 | adding file changes | |
64 | added 2 changesets with 2 changes to 1 files |
|
60 | added 2 changesets with 2 changes to 1 files | |
65 |
|
61 | |||
66 | $ printf "first\nsecond\nthird\n" > crlf.txt |
|
62 | $ printf "first\nsecond\nthird\n" > crlf.txt | |
67 | $ hg add crlf.txt |
|
63 | $ hg add crlf.txt | |
68 | $ hg commit -m 'LF crlf.txt' |
|
64 | $ hg commit -m 'LF crlf.txt' | |
69 | $ hg push ../main |
|
65 | $ hg push ../main | |
70 | pushing to ../main |
|
66 | pushing to ../main | |
71 | searching for changes |
|
67 | searching for changes | |
72 | adding changesets |
|
68 | adding changesets | |
73 | adding manifests |
|
69 | adding manifests | |
74 | adding file changes |
|
70 | adding file changes | |
75 | added 1 changesets with 1 changes to 1 files |
|
71 | added 1 changesets with 1 changes to 1 files | |
76 | error: pretxnchangegroup hook failed: crlf.txt should not have LF line endings |
|
72 | error: pretxnchangegroup hook failed: crlf.txt should not have LF line endings | |
77 | transaction abort! |
|
73 | transaction abort! | |
78 | rollback completed |
|
74 | rollback completed | |
79 | abort: crlf.txt should not have LF line endings |
|
75 | abort: crlf.txt should not have LF line endings | |
80 | [255] |
|
76 | [255] | |
81 |
|
77 | |||
82 | $ printf "first\r\nsecond\r\nthird\r\n" > crlf.txt |
|
78 | $ printf "first\r\nsecond\r\nthird\r\n" > crlf.txt | |
83 | $ hg commit -m 'CRLF crlf.txt (fixed)' |
|
79 | $ hg commit -m 'CRLF crlf.txt (fixed)' | |
84 | $ hg push ../main |
|
80 | $ hg push ../main | |
85 | pushing to ../main |
|
81 | pushing to ../main | |
86 | searching for changes |
|
82 | searching for changes | |
87 | adding changesets |
|
83 | adding changesets | |
88 | adding manifests |
|
84 | adding manifests | |
89 | adding file changes |
|
85 | adding file changes | |
90 | added 2 changesets with 2 changes to 1 files |
|
86 | added 2 changesets with 2 changes to 1 files |
@@ -1,40 +1,37 b'' | |||||
1 | http://mercurial.selenic.com/bts/issue2493 |
|
1 | http://mercurial.selenic.com/bts/issue2493 | |
2 |
|
2 | |||
3 | Testing tagging with the EOL extension |
|
3 | Testing tagging with the EOL extension | |
4 |
|
4 | |||
5 | $ cat >> $HGRCPATH <<EOF |
|
5 | $ cat >> $HGRCPATH <<EOF | |
6 | > [diff] |
|
|||
7 | > git = True |
|
|||
8 | > |
|
|||
9 | > [extensions] |
|
6 | > [extensions] | |
10 | > eol = |
|
7 | > eol = | |
11 | > |
|
8 | > | |
12 | > [eol] |
|
9 | > [eol] | |
13 | > native = CRLF |
|
10 | > native = CRLF | |
14 | > EOF |
|
11 | > EOF | |
15 |
|
12 | |||
16 | setup repository |
|
13 | setup repository | |
17 |
|
14 | |||
18 | $ hg init repo |
|
15 | $ hg init repo | |
19 | $ cd repo |
|
16 | $ cd repo | |
20 | $ cat > .hgeol <<EOF |
|
17 | $ cat > .hgeol <<EOF | |
21 | > [patterns] |
|
18 | > [patterns] | |
22 | > ** = native |
|
19 | > ** = native | |
23 | > EOF |
|
20 | > EOF | |
24 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt |
|
21 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt | |
25 | $ hg commit --addremove -m 'checkin' |
|
22 | $ hg commit --addremove -m 'checkin' | |
26 | adding .hgeol |
|
23 | adding .hgeol | |
27 | adding a.txt |
|
24 | adding a.txt | |
28 |
|
25 | |||
29 | Tag: |
|
26 | Tag: | |
30 |
|
27 | |||
31 | $ hg tag 1.0 |
|
28 | $ hg tag 1.0 | |
32 |
|
29 | |||
33 | Rewrite .hgtags file as it would look on a new checkout: |
|
30 | Rewrite .hgtags file as it would look on a new checkout: | |
34 |
|
31 | |||
35 | $ hg update -q null |
|
32 | $ hg update -q null | |
36 | $ hg update -q |
|
33 | $ hg update -q | |
37 |
|
34 | |||
38 | Touch .hgtags file again: |
|
35 | Touch .hgtags file again: | |
39 |
|
36 | |||
40 | $ hg tag 2.0 |
|
37 | $ hg tag 2.0 |
General Comments 0
You need to be logged in to leave comments.
Login now