Show More
@@ -28,88 +28,5 b' echo' | |||||
28 |
|
28 | |||
29 | python unix2mac.py f |
|
29 | python unix2mac.py f | |
30 | hg ci -m 2 -d'0 0' |
|
30 | hg ci -m 2 -d'0 0' | |
31 | hg revert -a |
|
31 | hg cat f | python print.py | |
32 | echo |
|
32 | cat f | python print.py | |
33 |
|
||||
34 | mkdir d |
|
|||
35 | echo hello > d/f2 |
|
|||
36 | python unix2mac.py d/f2 |
|
|||
37 | hg add d/f2 |
|
|||
38 | hg ci -m 3 -d'0 0' |
|
|||
39 | hg revert -a |
|
|||
40 | rm d/f2 |
|
|||
41 | echo |
|
|||
42 |
|
||||
43 | hg rem f |
|
|||
44 | hg ci -m 4 -d'0 0' |
|
|||
45 | echo |
|
|||
46 |
|
||||
47 | python -c 'file("bin", "wb").write("hello\x00\x0D")' |
|
|||
48 | hg add bin |
|
|||
49 | hg ci -m 5 -d'0 0' |
|
|||
50 | hg log -v |
|
|||
51 | echo |
|
|||
52 |
|
||||
53 | hg clone . dupe |
|
|||
54 | echo |
|
|||
55 | for x in a b c d; do echo content > dupe/$x; done |
|
|||
56 | hg -R dupe add |
|
|||
57 | python unix2mac.py dupe/b dupe/c dupe/d |
|
|||
58 | hg -R dupe ci -m a -d'0 0' dupe/a |
|
|||
59 | hg -R dupe ci -m b/c -d'0 0' dupe/[bc] |
|
|||
60 | hg -R dupe ci -m d -d'0 0' dupe/d |
|
|||
61 | hg -R dupe log -v |
|
|||
62 | echo |
|
|||
63 |
|
||||
64 | hg pull dupe |
|
|||
65 | echo |
|
|||
66 |
|
||||
67 | hg log -v |
|
|||
68 | echo |
|
|||
69 |
|
||||
70 | rm .hg/hgrc |
|
|||
71 | (echo some; echo text) > f3 |
|
|||
72 | python -c 'file("f4.bat", "wb").write("rem empty\x0D")' |
|
|||
73 | hg add f3 f4.bat |
|
|||
74 | hg ci -m 6 -d'0 0' |
|
|||
75 |
|
||||
76 | python print.py < bin |
|
|||
77 | python print.py < f3 |
|
|||
78 | python print.py < f4.bat |
|
|||
79 | echo |
|
|||
80 |
|
||||
81 | echo '[extensions]' >> .hg/hgrc |
|
|||
82 | echo 'win32text = ' >> .hg/hgrc |
|
|||
83 | echo '[decode]' >> .hg/hgrc |
|
|||
84 | echo '** = macdecode:' >> .hg/hgrc |
|
|||
85 | echo '[encode]' >> .hg/hgrc |
|
|||
86 | echo '** = macencode:' >> .hg/hgrc |
|
|||
87 | cat .hg/hgrc |
|
|||
88 | echo |
|
|||
89 |
|
||||
90 | rm f3 f4.bat bin |
|
|||
91 | hg co 2>&1 | python -c 'import sys, os; sys.stdout.write(sys.stdin.read().replace(os.getcwd(), "...."))' |
|
|||
92 | python print.py < bin |
|
|||
93 | python print.py < f3 |
|
|||
94 | python print.py < f4.bat |
|
|||
95 | echo |
|
|||
96 |
|
||||
97 | python -c 'file("f5.sh", "wb").write("# empty\x0D")' |
|
|||
98 | hg add f5.sh |
|
|||
99 | hg ci -m 7 -d'0 0' |
|
|||
100 | python print.py < f5.sh |
|
|||
101 | hg cat f5.sh | python print.py |
|
|||
102 |
|
||||
103 | echo '% just linefeed' > linefeed |
|
|||
104 | hg ci -qAm 8 linefeed |
|
|||
105 | python print.py < linefeed |
|
|||
106 | hg cat linefeed | python print.py |
|
|||
107 | hg st -q |
|
|||
108 | hg revert -a linefeed |
|
|||
109 | python print.py < linefeed |
|
|||
110 | hg st -q |
|
|||
111 | echo modified >> linefeed |
|
|||
112 | hg st -q |
|
|||
113 | hg revert -a |
|
|||
114 | hg st -q |
|
|||
115 | python print.py < linefeed |
|
@@ -8,180 +8,5 b' in dea860dc51ec: f' | |||||
8 | transaction abort! |
|
8 | transaction abort! | |
9 | rollback completed |
|
9 | rollback completed | |
10 | abort: pretxncommit.cr hook failed |
|
10 | abort: pretxncommit.cr hook failed | |
11 | reverting f |
|
11 | hello<LF> | |
12 |
|
12 | hello<CR> | ||
13 | Attempt to commit or push text file(s) using CR line endings |
|
|||
14 | in 8aa1d87b4e2f: d/f2 |
|
|||
15 | transaction abort! |
|
|||
16 | rollback completed |
|
|||
17 | abort: pretxncommit.cr hook failed |
|
|||
18 | forgetting d/f2 |
|
|||
19 |
|
||||
20 |
|
||||
21 | changeset: 2:d7599e43717c |
|
|||
22 | tag: tip |
|
|||
23 | user: test |
|
|||
24 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
25 | files: bin |
|
|||
26 | description: |
|
|||
27 | 5 |
|
|||
28 |
|
||||
29 |
|
||||
30 | changeset: 1:c72a7d1d0907 |
|
|||
31 | user: test |
|
|||
32 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
33 | files: f |
|
|||
34 | description: |
|
|||
35 | 4 |
|
|||
36 |
|
||||
37 |
|
||||
38 | changeset: 0:fcf06d5c4e1d |
|
|||
39 | user: test |
|
|||
40 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
41 | files: f |
|
|||
42 | description: |
|
|||
43 | 1 |
|
|||
44 |
|
||||
45 |
|
||||
46 |
|
||||
47 | updating working directory |
|
|||
48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
49 |
|
||||
50 | adding dupe/a |
|
|||
51 | adding dupe/b |
|
|||
52 | adding dupe/c |
|
|||
53 | adding dupe/d |
|
|||
54 | changeset: 5:ebbcbe52b20e |
|
|||
55 | tag: tip |
|
|||
56 | user: test |
|
|||
57 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
58 | files: d |
|
|||
59 | description: |
|
|||
60 | d |
|
|||
61 |
|
||||
62 |
|
||||
63 | changeset: 4:ceeb93d6508a |
|
|||
64 | user: test |
|
|||
65 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
66 | files: b c |
|
|||
67 | description: |
|
|||
68 | b/c |
|
|||
69 |
|
||||
70 |
|
||||
71 | changeset: 3:c5404edbb872 |
|
|||
72 | user: test |
|
|||
73 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
74 | files: a |
|
|||
75 | description: |
|
|||
76 | a |
|
|||
77 |
|
||||
78 |
|
||||
79 | changeset: 2:d7599e43717c |
|
|||
80 | user: test |
|
|||
81 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
82 | files: bin |
|
|||
83 | description: |
|
|||
84 | 5 |
|
|||
85 |
|
||||
86 |
|
||||
87 | changeset: 1:c72a7d1d0907 |
|
|||
88 | user: test |
|
|||
89 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
90 | files: f |
|
|||
91 | description: |
|
|||
92 | 4 |
|
|||
93 |
|
||||
94 |
|
||||
95 | changeset: 0:fcf06d5c4e1d |
|
|||
96 | user: test |
|
|||
97 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
98 | files: f |
|
|||
99 | description: |
|
|||
100 | 1 |
|
|||
101 |
|
||||
102 |
|
||||
103 |
|
||||
104 | pulling from dupe |
|
|||
105 | searching for changes |
|
|||
106 | adding changesets |
|
|||
107 | adding manifests |
|
|||
108 | adding file changes |
|
|||
109 | added 3 changesets with 4 changes to 4 files |
|
|||
110 | Attempt to commit or push text file(s) using CR line endings |
|
|||
111 | in ceeb93d6508a: b |
|
|||
112 | in ceeb93d6508a: c |
|
|||
113 | in ebbcbe52b20e: d |
|
|||
114 |
|
||||
115 | To prevent this mistake in your local repository, |
|
|||
116 | add to Mercurial.ini or .hg/hgrc: |
|
|||
117 |
|
||||
118 | [hooks] |
|
|||
119 | pretxncommit.cr = python:hgext.win32text.forbidcr |
|
|||
120 |
|
||||
121 | and also consider adding: |
|
|||
122 |
|
||||
123 | [extensions] |
|
|||
124 | hgext.win32text = |
|
|||
125 | [encode] |
|
|||
126 | ** = macencode: |
|
|||
127 | [decode] |
|
|||
128 | ** = macdecode: |
|
|||
129 | transaction abort! |
|
|||
130 | rollback completed |
|
|||
131 | abort: pretxnchangegroup.cr hook failed |
|
|||
132 |
|
||||
133 | changeset: 2:d7599e43717c |
|
|||
134 | tag: tip |
|
|||
135 | user: test |
|
|||
136 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
137 | files: bin |
|
|||
138 | description: |
|
|||
139 | 5 |
|
|||
140 |
|
||||
141 |
|
||||
142 | changeset: 1:c72a7d1d0907 |
|
|||
143 | user: test |
|
|||
144 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
145 | files: f |
|
|||
146 | description: |
|
|||
147 | 4 |
|
|||
148 |
|
||||
149 |
|
||||
150 | changeset: 0:fcf06d5c4e1d |
|
|||
151 | user: test |
|
|||
152 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
153 | files: f |
|
|||
154 | description: |
|
|||
155 | 1 |
|
|||
156 |
|
||||
157 |
|
||||
158 |
|
||||
159 | hello<NUL><CR> |
|
|||
160 | some<LF>text<LF> |
|
|||
161 | rem empty<CR> |
|
|||
162 |
|
||||
163 | [extensions] |
|
|||
164 | win32text = |
|
|||
165 | [decode] |
|
|||
166 | ** = macdecode: |
|
|||
167 | [encode] |
|
|||
168 | ** = macencode: |
|
|||
169 |
|
||||
170 | WARNING: f4.bat already has CR line endings |
|
|||
171 | and does not need EOL conversion by the win32text plugin. |
|
|||
172 | Before your next commit, please reconsider your encode/decode settings in |
|
|||
173 | Mercurial.ini or ..../.hg/hgrc. |
|
|||
174 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
175 | hello<NUL><CR> |
|
|||
176 | some<CR>text<CR> |
|
|||
177 | rem empty<CR> |
|
|||
178 |
|
||||
179 | # empty<CR> |
|
|||
180 | # empty<LF> |
|
|||
181 | % just linefeed<LF> |
|
|||
182 | % just linefeed<LF> |
|
|||
183 | no changes needed to linefeed |
|
|||
184 | % just linefeed<LF> |
|
|||
185 | M linefeed |
|
|||
186 | reverting linefeed |
|
|||
187 | % just linefeed<CR> |
|
General Comments 0
You need to be logged in to leave comments.
Login now