Show More
@@ -0,0 +1,40 b'' | |||||
|
1 | http://mercurial.selenic.com/bts/issue2493 | |||
|
2 | ||||
|
3 | Testing tagging with the EOL extension | |||
|
4 | ||||
|
5 | $ cat > $HGRCPATH <<EOF | |||
|
6 | > [diff] | |||
|
7 | > git = True | |||
|
8 | > | |||
|
9 | > [extensions] | |||
|
10 | > eol = | |||
|
11 | > | |||
|
12 | > [eol] | |||
|
13 | > native = CRLF | |||
|
14 | > EOF | |||
|
15 | ||||
|
16 | setup repository | |||
|
17 | ||||
|
18 | $ hg init repo | |||
|
19 | $ cd repo | |||
|
20 | $ cat > .hgeol <<EOF | |||
|
21 | > [patterns] | |||
|
22 | > ** = native | |||
|
23 | > EOF | |||
|
24 | $ printf "first\r\nsecond\r\nthird\r\n" > a.txt | |||
|
25 | $ hg commit --addremove -m 'checkin' | |||
|
26 | adding .hgeol | |||
|
27 | adding a.txt | |||
|
28 | ||||
|
29 | Tag: | |||
|
30 | ||||
|
31 | $ hg tag 1.0 | |||
|
32 | ||||
|
33 | Rewrite .hgtags file as it would look on a new checkout: | |||
|
34 | ||||
|
35 | $ hg update -q null | |||
|
36 | $ hg update -q | |||
|
37 | ||||
|
38 | Touch .hgtags file again: | |||
|
39 | ||||
|
40 | $ hg tag 2.0 |
@@ -176,6 +176,10 b' def reposetup(ui, repo):' | |||||
176 | self._decode['NATIVE'] = 'to-crlf' |
|
176 | self._decode['NATIVE'] = 'to-crlf' | |
177 |
|
177 | |||
178 | eol = config.config() |
|
178 | eol = config.config() | |
|
179 | # Our files should not be touched. The pattern must be | |||
|
180 | # inserted first override a '** = native' pattern. | |||
|
181 | eol.set('patterns', '.hg*', 'BIN') | |||
|
182 | # We can then parse the user's patterns. | |||
179 | eol.parse('.hgeol', data) |
|
183 | eol.parse('.hgeol', data) | |
180 |
|
184 | |||
181 | if eol.get('repository', 'native') == 'CRLF': |
|
185 | if eol.get('repository', 'native') == 'CRLF': |
General Comments 0
You need to be logged in to leave comments.
Login now