Show More
@@ -1,210 +1,213 b'' | |||||
1 | #require icasefs |
|
1 | #require icasefs | |
2 |
|
2 | |||
3 | $ hg debugfs | grep 'case-sensitive:' |
|
3 | $ hg debugfs | grep 'case-sensitive:' | |
4 | case-sensitive: no |
|
4 | case-sensitive: no | |
5 |
|
5 | |||
6 | test file addition with bad case |
|
6 | test file addition with bad case | |
7 |
|
7 | |||
8 | $ hg init repo1 |
|
8 | $ hg init repo1 | |
9 | $ cd repo1 |
|
9 | $ cd repo1 | |
10 | $ echo a > a |
|
10 | $ echo a > a | |
11 | $ hg add A |
|
11 | $ hg add A | |
12 | adding a |
|
12 | adding a | |
13 | $ hg st |
|
13 | $ hg st | |
14 | A a |
|
14 | A a | |
15 | $ hg ci -m adda |
|
15 | $ hg ci -m adda | |
16 | $ hg manifest |
|
16 | $ hg manifest | |
17 | a |
|
17 | a | |
18 | $ cd .. |
|
18 | $ cd .. | |
19 |
|
19 | |||
20 | test case collision on rename (issue750) |
|
20 | test case collision on rename (issue750) | |
21 |
|
21 | |||
22 | $ hg init repo2 |
|
22 | $ hg init repo2 | |
23 | $ cd repo2 |
|
23 | $ cd repo2 | |
24 | $ echo a > a |
|
24 | $ echo a > a | |
25 | $ hg --debug ci -Am adda |
|
25 | $ hg --debug ci -Am adda | |
26 | adding a |
|
26 | adding a | |
|
27 | committing files: | |||
27 | a |
|
28 | a | |
|
29 | committing manifest | |||
|
30 | committing changelog | |||
28 | committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9 |
|
31 | committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9 | |
29 |
|
32 | |||
30 | Case-changing renames should work: |
|
33 | Case-changing renames should work: | |
31 |
|
34 | |||
32 | $ hg mv a A |
|
35 | $ hg mv a A | |
33 | $ hg mv A a |
|
36 | $ hg mv A a | |
34 | $ hg st |
|
37 | $ hg st | |
35 |
|
38 | |||
36 | test changing case of path components |
|
39 | test changing case of path components | |
37 |
|
40 | |||
38 | $ mkdir D |
|
41 | $ mkdir D | |
39 | $ echo b > D/b |
|
42 | $ echo b > D/b | |
40 | $ hg ci -Am addb D/b |
|
43 | $ hg ci -Am addb D/b | |
41 | $ hg mv D/b d/b |
|
44 | $ hg mv D/b d/b | |
42 | D/b: not overwriting - file exists |
|
45 | D/b: not overwriting - file exists | |
43 | $ hg mv D/b d/c |
|
46 | $ hg mv D/b d/c | |
44 | $ hg st |
|
47 | $ hg st | |
45 | A D/c |
|
48 | A D/c | |
46 | R D/b |
|
49 | R D/b | |
47 | $ mv D temp |
|
50 | $ mv D temp | |
48 | $ mv temp d |
|
51 | $ mv temp d | |
49 | $ hg st |
|
52 | $ hg st | |
50 | A D/c |
|
53 | A D/c | |
51 | R D/b |
|
54 | R D/b | |
52 | $ hg revert -aq |
|
55 | $ hg revert -aq | |
53 | $ rm d/c |
|
56 | $ rm d/c | |
54 | $ echo c > D/c |
|
57 | $ echo c > D/c | |
55 | $ hg add D/c |
|
58 | $ hg add D/c | |
56 | $ hg st |
|
59 | $ hg st | |
57 | A D/c |
|
60 | A D/c | |
58 | $ hg ci -m addc D/c |
|
61 | $ hg ci -m addc D/c | |
59 | $ hg mv d/b d/e |
|
62 | $ hg mv d/b d/e | |
60 | moving D/b to D/e (glob) |
|
63 | moving D/b to D/e (glob) | |
61 | $ hg st |
|
64 | $ hg st | |
62 | A D/e |
|
65 | A D/e | |
63 | R D/b |
|
66 | R D/b | |
64 | $ hg revert -aq |
|
67 | $ hg revert -aq | |
65 | $ rm d/e |
|
68 | $ rm d/e | |
66 | $ hg mv d/b D/B |
|
69 | $ hg mv d/b D/B | |
67 | moving D/b to D/B (glob) |
|
70 | moving D/b to D/B (glob) | |
68 | $ hg st |
|
71 | $ hg st | |
69 | A D/B |
|
72 | A D/B | |
70 | R D/b |
|
73 | R D/b | |
71 | $ cd .. |
|
74 | $ cd .. | |
72 |
|
75 | |||
73 | test case collision between revisions (issue912) |
|
76 | test case collision between revisions (issue912) | |
74 |
|
77 | |||
75 | $ hg init repo3 |
|
78 | $ hg init repo3 | |
76 | $ cd repo3 |
|
79 | $ cd repo3 | |
77 | $ echo a > a |
|
80 | $ echo a > a | |
78 | $ hg ci -Am adda |
|
81 | $ hg ci -Am adda | |
79 | adding a |
|
82 | adding a | |
80 | $ hg rm a |
|
83 | $ hg rm a | |
81 | $ hg ci -Am removea |
|
84 | $ hg ci -Am removea | |
82 | $ echo A > A |
|
85 | $ echo A > A | |
83 |
|
86 | |||
84 | on linux hfs keeps the old case stored, force it |
|
87 | on linux hfs keeps the old case stored, force it | |
85 |
|
88 | |||
86 | $ mv a aa |
|
89 | $ mv a aa | |
87 | $ mv aa A |
|
90 | $ mv aa A | |
88 | $ hg ci -Am addA |
|
91 | $ hg ci -Am addA | |
89 | adding A |
|
92 | adding A | |
90 |
|
93 | |||
91 | used to fail under case insensitive fs |
|
94 | used to fail under case insensitive fs | |
92 |
|
95 | |||
93 | $ hg up -C 0 |
|
96 | $ hg up -C 0 | |
94 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
97 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
95 | $ hg up -C |
|
98 | $ hg up -C | |
96 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
99 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
97 |
|
100 | |||
98 | no clobbering of untracked files with wrong casing |
|
101 | no clobbering of untracked files with wrong casing | |
99 |
|
102 | |||
100 | $ hg up -r null |
|
103 | $ hg up -r null | |
101 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
104 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
102 | $ echo gold > a |
|
105 | $ echo gold > a | |
103 | $ hg up |
|
106 | $ hg up | |
104 | A: untracked file differs |
|
107 | A: untracked file differs | |
105 | abort: untracked files in working directory differ from files in requested revision |
|
108 | abort: untracked files in working directory differ from files in requested revision | |
106 | [255] |
|
109 | [255] | |
107 | $ cat a |
|
110 | $ cat a | |
108 | gold |
|
111 | gold | |
109 | $ rm a |
|
112 | $ rm a | |
110 |
|
113 | |||
111 | test that normal file in different case on target context is not |
|
114 | test that normal file in different case on target context is not | |
112 | unlinked by largefiles extension. |
|
115 | unlinked by largefiles extension. | |
113 |
|
116 | |||
114 | $ cat >> .hg/hgrc <<EOF |
|
117 | $ cat >> .hg/hgrc <<EOF | |
115 | > [extensions] |
|
118 | > [extensions] | |
116 | > largefiles= |
|
119 | > largefiles= | |
117 | > EOF |
|
120 | > EOF | |
118 | $ hg update -q -C 1 |
|
121 | $ hg update -q -C 1 | |
119 | $ hg status -A |
|
122 | $ hg status -A | |
120 | $ echo 'A as largefiles' > A |
|
123 | $ echo 'A as largefiles' > A | |
121 | $ hg add --large A |
|
124 | $ hg add --large A | |
122 | $ hg commit -m '#3' |
|
125 | $ hg commit -m '#3' | |
123 | created new head |
|
126 | created new head | |
124 | $ hg manifest -r 3 |
|
127 | $ hg manifest -r 3 | |
125 | .hglf/A |
|
128 | .hglf/A | |
126 | $ hg manifest -r 0 |
|
129 | $ hg manifest -r 0 | |
127 | a |
|
130 | a | |
128 | $ hg update -q -C 0 |
|
131 | $ hg update -q -C 0 | |
129 | $ hg status -A |
|
132 | $ hg status -A | |
130 | C a |
|
133 | C a | |
131 | $ hg update -q -C 3 |
|
134 | $ hg update -q -C 3 | |
132 | $ hg update -q 0 |
|
135 | $ hg update -q 0 | |
133 |
|
136 | |||
134 | $ cd .. |
|
137 | $ cd .. | |
135 |
|
138 | |||
136 | issue 3342: file in nested directory causes unexpected abort |
|
139 | issue 3342: file in nested directory causes unexpected abort | |
137 |
|
140 | |||
138 | $ hg init issue3342 |
|
141 | $ hg init issue3342 | |
139 | $ cd issue3342 |
|
142 | $ cd issue3342 | |
140 |
|
143 | |||
141 | $ mkdir -p a/B/c/D |
|
144 | $ mkdir -p a/B/c/D | |
142 | $ echo e > a/B/c/D/e |
|
145 | $ echo e > a/B/c/D/e | |
143 | $ hg add a/B/c/D/e |
|
146 | $ hg add a/B/c/D/e | |
144 |
|
147 | |||
145 | $ cd .. |
|
148 | $ cd .. | |
146 |
|
149 | |||
147 | issue 3340: mq does not handle case changes correctly |
|
150 | issue 3340: mq does not handle case changes correctly | |
148 |
|
151 | |||
149 | in addition to reported case, 'hg qrefresh' is also tested against |
|
152 | in addition to reported case, 'hg qrefresh' is also tested against | |
150 | case changes. |
|
153 | case changes. | |
151 |
|
154 | |||
152 | $ echo "[extensions]" >> $HGRCPATH |
|
155 | $ echo "[extensions]" >> $HGRCPATH | |
153 | $ echo "mq=" >> $HGRCPATH |
|
156 | $ echo "mq=" >> $HGRCPATH | |
154 |
|
157 | |||
155 | $ hg init issue3340 |
|
158 | $ hg init issue3340 | |
156 | $ cd issue3340 |
|
159 | $ cd issue3340 | |
157 |
|
160 | |||
158 | $ echo a > mIxEdCaSe |
|
161 | $ echo a > mIxEdCaSe | |
159 | $ hg add mIxEdCaSe |
|
162 | $ hg add mIxEdCaSe | |
160 | $ hg commit -m '#0' |
|
163 | $ hg commit -m '#0' | |
161 | $ hg rename mIxEdCaSe tmp |
|
164 | $ hg rename mIxEdCaSe tmp | |
162 | $ hg rename tmp MiXeDcAsE |
|
165 | $ hg rename tmp MiXeDcAsE | |
163 | $ hg status -A |
|
166 | $ hg status -A | |
164 | A MiXeDcAsE |
|
167 | A MiXeDcAsE | |
165 | mIxEdCaSe |
|
168 | mIxEdCaSe | |
166 | R mIxEdCaSe |
|
169 | R mIxEdCaSe | |
167 | $ hg qnew changecase |
|
170 | $ hg qnew changecase | |
168 | $ hg status -A |
|
171 | $ hg status -A | |
169 | C MiXeDcAsE |
|
172 | C MiXeDcAsE | |
170 |
|
173 | |||
171 | $ hg qpop -a |
|
174 | $ hg qpop -a | |
172 | popping changecase |
|
175 | popping changecase | |
173 | patch queue now empty |
|
176 | patch queue now empty | |
174 | $ hg qnew refresh-casechange |
|
177 | $ hg qnew refresh-casechange | |
175 | $ hg status -A |
|
178 | $ hg status -A | |
176 | C mIxEdCaSe |
|
179 | C mIxEdCaSe | |
177 | $ hg rename mIxEdCaSe tmp |
|
180 | $ hg rename mIxEdCaSe tmp | |
178 | $ hg rename tmp MiXeDcAsE |
|
181 | $ hg rename tmp MiXeDcAsE | |
179 | $ hg status -A |
|
182 | $ hg status -A | |
180 | A MiXeDcAsE |
|
183 | A MiXeDcAsE | |
181 | mIxEdCaSe |
|
184 | mIxEdCaSe | |
182 | R mIxEdCaSe |
|
185 | R mIxEdCaSe | |
183 | $ hg qrefresh |
|
186 | $ hg qrefresh | |
184 | $ hg status -A |
|
187 | $ hg status -A | |
185 | C MiXeDcAsE |
|
188 | C MiXeDcAsE | |
186 |
|
189 | |||
187 | $ hg qpop -a |
|
190 | $ hg qpop -a | |
188 | popping refresh-casechange |
|
191 | popping refresh-casechange | |
189 | patch queue now empty |
|
192 | patch queue now empty | |
190 | $ hg qnew refresh-pattern |
|
193 | $ hg qnew refresh-pattern | |
191 | $ hg status |
|
194 | $ hg status | |
192 | $ echo A > A |
|
195 | $ echo A > A | |
193 | $ hg add |
|
196 | $ hg add | |
194 | adding A |
|
197 | adding A | |
195 | $ hg qrefresh a # issue 3271, qrefresh with file handled case wrong |
|
198 | $ hg qrefresh a # issue 3271, qrefresh with file handled case wrong | |
196 | $ hg status # empty status means the qrefresh worked |
|
199 | $ hg status # empty status means the qrefresh worked | |
197 |
|
200 | |||
198 | #if osx |
|
201 | #if osx | |
199 |
|
202 | |||
200 | We assume anyone running the tests on a case-insensitive volume on OS |
|
203 | We assume anyone running the tests on a case-insensitive volume on OS | |
201 | X will be using HFS+. If that's not true, this test will fail. |
|
204 | X will be using HFS+. If that's not true, this test will fail. | |
202 |
|
205 | |||
203 | $ rm A |
|
206 | $ rm A | |
204 | >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun') |
|
207 | >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun') | |
205 | $ hg status |
|
208 | $ hg status | |
206 | M A |
|
209 | M A | |
207 |
|
210 | |||
208 | #endif |
|
211 | #endif | |
209 |
|
212 | |||
210 | $ cd .. |
|
213 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now