Show More
@@ -9,7 +9,19 Create the repository outside $HOME sinc | |||
|
9 | 9 | $ cd test |
|
10 | 10 | $ echo "root" > root |
|
11 | 11 | $ hg add root |
|
12 | $ hg commit -m "Root commit" | |
|
12 | $ hg commit -m "Root commit" --config extensions.largefiles=! | |
|
13 | ||
|
14 | Ensure that .hg/largefiles isn't created before largefiles are added | |
|
15 | #if unix-permissions | |
|
16 | $ chmod 555 .hg | |
|
17 | #endif | |
|
18 | $ hg status | |
|
19 | #if unix-permissions | |
|
20 | $ chmod 755 .hg | |
|
21 | #endif | |
|
22 | ||
|
23 | $ test -f .hg/largefiles | |
|
24 | [1] | |
|
13 | 25 | |
|
14 | 26 | $ echo "large" > foo |
|
15 | 27 | $ hg add --large foo |
@@ -145,70 +157,78 Updating from normal to largefile - no r | |||
|
145 | 157 | |
|
146 | 158 | Systematic testing of merges involving largefiles: |
|
147 | 159 | |
|
148 |
Ancestor: normal Parent: normal |
|
|
160 | Ancestor: normal Parent: normal-id Parent: large result: large | |
|
149 | 161 | Ancestor: normal Parent: normal2 Parent: large result: ? |
|
150 |
Ancestor: large Parent: large |
|
|
162 | Ancestor: large Parent: large-id Parent: normal result: normal | |
|
151 | 163 | Ancestor: large Parent: large2 Parent: normal result: ? |
|
152 | 164 | |
|
153 | 165 | All cases should try merging both ways. |
|
154 | "=" means same file content. | |
|
155 | 166 | |
|
156 | 167 | Prepare test repo: |
|
157 | 168 | |
|
158 | 169 | $ hg init merges |
|
159 | 170 | $ cd merges |
|
160 | $ touch f1 | |
|
161 | $ hg ci -Aqm "0-root" --config extensions.largefiles=! | |
|
162 | 171 | |
|
163 | Ensure that .hg/largefiles isn't created before largefiles are added | |
|
164 | #if unix-permissions | |
|
165 | $ chmod 555 .hg | |
|
166 | #endif | |
|
167 | $ hg status | |
|
168 | #if unix-permissions | |
|
169 | $ chmod 755 .hg | |
|
170 | #endif | |
|
172 | prepare cases with "normal" ancestor: | |
|
171 | 173 | |
|
172 | $ test -f .hg/largefiles | |
|
173 | [1] | |
|
174 | ||
|
175 | ancestor is "normal": | |
|
174 | $ hg up -qr null | |
|
176 | 175 | $ echo normal > f |
|
177 |
$ hg ci -Aqm " |
|
|
176 | $ hg ci -Aqm "normal-ancestor" | |
|
177 | $ hg tag -l "normal-ancestor" | |
|
178 | 178 | $ touch f2 |
|
179 |
$ hg ci -Aqm " |
|
|
180 |
$ hg tag -l "normal |
|
|
179 | $ hg ci -Aqm "normal-id" | |
|
180 | $ hg tag -l "normal-id" | |
|
181 | 181 | $ echo normal2 > f |
|
182 |
$ hg ci -m " |
|
|
182 | $ hg ci -m "normal2" | |
|
183 | 183 | $ hg tag -l "normal2" |
|
184 |
$ hg up -qr |
|
|
184 | $ hg up -qr "normal-ancestor" | |
|
185 | 185 | $ hg rm f |
|
186 | 186 | $ echo large > f |
|
187 | 187 | $ hg add --large f |
|
188 |
$ hg ci -qm " |
|
|
188 | $ hg ci -qm "large" | |
|
189 | 189 | $ hg tag -l "large" |
|
190 | 190 | |
|
191 | $ hg up -qr null | |
|
191 | prepare cases with "large" ancestor: | |
|
192 | 192 | |
|
193 | ancestor is "large": | |
|
193 | $ hg up -qr null | |
|
194 | 194 | $ echo large > f |
|
195 | 195 | $ hg add --large f |
|
196 |
$ hg ci -qm " |
|
|
196 | $ hg ci -qm "large-ancestor" | |
|
197 | $ hg tag -l "large-ancestor" | |
|
197 | 198 | $ touch f2 |
|
198 |
$ hg ci -Aqm " |
|
|
199 |
$ hg tag -l "large |
|
|
199 | $ hg ci -Aqm "large-id" | |
|
200 | $ hg tag -l "large-id" | |
|
200 | 201 | $ echo large2 > f |
|
201 |
$ hg ci -m " |
|
|
202 | $ hg ci -m "large2" | |
|
202 | 203 | $ hg tag -l "large2" |
|
203 |
$ hg up -qr |
|
|
204 | $ hg up -qr "large-ancestor" | |
|
204 | 205 | $ hg rm f |
|
205 | 206 | $ echo normal > f |
|
206 |
$ hg ci -qAm " |
|
|
207 | $ hg ci -qAm "normal" | |
|
207 | 208 | $ hg tag -l "normal" |
|
208 | 209 | |
|
209 | Ancestor: normal Parent: normal= Parent: large result: large | |
|
210 | $ hg log -GT '{tags}' | |
|
211 | @ normal tip | |
|
212 | | | |
|
213 | | o large2 | |
|
214 | | | | |
|
215 | | o large-id | |
|
216 | |/ | |
|
217 | o large-ancestor | |
|
210 | 218 | |
|
211 | $ hg up -Cqr normal= | |
|
219 | o large | |
|
220 | | | |
|
221 | | o normal2 | |
|
222 | | | | |
|
223 | | o normal-id | |
|
224 | |/ | |
|
225 | o normal-ancestor | |
|
226 | ||
|
227 | ||
|
228 | ||
|
229 | Ancestor: normal Parent: normal-id Parent: large result: large | |
|
230 | ||
|
231 | $ hg up -Cqr normal-id | |
|
212 | 232 | $ hg merge -r large |
|
213 | 233 | getting changed largefiles |
|
214 | 234 | 1 largefiles updated, 0 removed |
@@ -220,7 +240,7 Ancestor: normal Parent: normal= Paren | |||
|
220 | 240 | swap |
|
221 | 241 | |
|
222 | 242 | $ hg up -Cqr large |
|
223 |
$ hg merge -r normal |
|
|
243 | $ hg merge -r normal-id | |
|
224 | 244 | getting changed largefiles |
|
225 | 245 | 0 largefiles updated, 0 removed |
|
226 | 246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -307,9 +327,9 swap | |||
|
307 | 327 | $ cat f |
|
308 | 328 | large |
|
309 | 329 | |
|
310 |
Ancestor: large Parent: large |
|
|
330 | Ancestor: large Parent: large-id Parent: normal result: normal | |
|
311 | 331 | |
|
312 |
$ hg up -Cqr large |
|
|
332 | $ hg up -Cqr large-id | |
|
313 | 333 | $ hg merge -r normal |
|
314 | 334 | getting changed largefiles |
|
315 | 335 | 0 largefiles updated, 0 removed |
@@ -321,7 +341,7 Ancestor: large Parent: large= Paren | |||
|
321 | 341 | swap |
|
322 | 342 | |
|
323 | 343 | $ hg up -Cqr normal |
|
324 |
$ hg merge -r large |
|
|
344 | $ hg merge -r large-id | |
|
325 | 345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
326 | 346 | (branch merge, don't forget to commit) |
|
327 | 347 | $ cat f |
General Comments 0
You need to be logged in to leave comments.
Login now