Show More
@@ -1,877 +1,877 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > largefiles= |
|
4 | 4 | > purge= |
|
5 | 5 | > rebase= |
|
6 | 6 | > [largefiles] |
|
7 | 7 | > minsize=2 |
|
8 | 8 | > patterns=glob:**.dat |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | Create the repo with a couple of revisions of both large and normal |
|
12 | 12 | files, testing that status correctly shows largefiles. |
|
13 | 13 | |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | $ mkdir sub |
|
17 | 17 | $ echo normal1 > normal1 |
|
18 | 18 | $ echo normal2 > sub/normal2 |
|
19 | 19 | $ echo large1 > large1 |
|
20 | 20 | $ echo large2 > sub/large2 |
|
21 | 21 | $ hg add normal1 sub/normal2 |
|
22 | 22 | $ hg add --large large1 sub/large2 |
|
23 | 23 | $ hg commit -m "add files" |
|
24 | 24 | $ echo normal11 > normal1 |
|
25 | 25 | $ echo normal22 > sub/normal2 |
|
26 | 26 | $ echo large11 > large1 |
|
27 | 27 | $ echo large22 > sub/large2 |
|
28 | 28 | $ hg st |
|
29 | 29 | M large1 |
|
30 | 30 | M normal1 |
|
31 | 31 | M sub/large2 |
|
32 | 32 | M sub/normal2 |
|
33 | 33 | $ hg commit -m "edit files" |
|
34 | 34 | |
|
35 | 35 | Commit preserved largefile contents. |
|
36 | 36 | |
|
37 | 37 | $ cat normal1 |
|
38 | 38 | normal11 |
|
39 | 39 | $ cat large1 |
|
40 | 40 | large11 |
|
41 | 41 | $ cat sub/normal2 |
|
42 | 42 | normal22 |
|
43 | 43 | $ cat sub/large2 |
|
44 | 44 | large22 |
|
45 | 45 | |
|
46 | 46 | Remove both largefiles and normal files. |
|
47 | 47 | |
|
48 | 48 | $ hg remove normal1 large1 |
|
49 | 49 | $ hg commit -m "remove files" |
|
50 | 50 | $ ls |
|
51 | 51 | sub |
|
52 | 52 | |
|
53 | 53 | Copy both largefiles and normal files. |
|
54 | 54 | |
|
55 | 55 | $ hg cp sub/normal2 normal1 |
|
56 | 56 | $ hg cp sub/large2 large1 |
|
57 | 57 | $ hg commit -m "copy files" |
|
58 | 58 | $ cat normal1 |
|
59 | 59 | normal22 |
|
60 | 60 | $ cat large1 |
|
61 | 61 | large22 |
|
62 | 62 | |
|
63 | 63 | Test moving largefiles and verify that normal files are also unaffected. |
|
64 | 64 | |
|
65 | 65 | $ hg mv normal1 normal3 |
|
66 | 66 | $ hg mv large1 large3 |
|
67 | 67 | $ hg mv sub/normal2 sub/normal4 |
|
68 | 68 | $ hg mv sub/large2 sub/large4 |
|
69 | 69 | $ hg commit -m "move files" |
|
70 | 70 | $ cat normal3 |
|
71 | 71 | normal22 |
|
72 | 72 | $ cat large3 |
|
73 | 73 | large22 |
|
74 | 74 | $ cat sub/normal4 |
|
75 | 75 | normal22 |
|
76 | 76 | $ cat sub/large4 |
|
77 | 77 | large22 |
|
78 | 78 | |
|
79 | 79 | Test archiving the various revisions. These hit corner cases known with |
|
80 | 80 | archiving. |
|
81 | 81 | |
|
82 | 82 | $ hg archive -r 0 ../archive0 |
|
83 | 83 | $ hg archive -r 1 ../archive1 |
|
84 | 84 | $ hg archive -r 2 ../archive2 |
|
85 | 85 | $ hg archive -r 3 ../archive3 |
|
86 | 86 | $ hg archive -r 4 ../archive4 |
|
87 | 87 | $ cd ../archive0 |
|
88 | 88 | $ cat normal1 |
|
89 | 89 | normal1 |
|
90 | 90 | $ cat large1 |
|
91 | 91 | large1 |
|
92 | 92 | $ cat sub/normal2 |
|
93 | 93 | normal2 |
|
94 | 94 | $ cat sub/large2 |
|
95 | 95 | large2 |
|
96 | 96 | $ cd ../archive1 |
|
97 | 97 | $ cat normal1 |
|
98 | 98 | normal11 |
|
99 | 99 | $ cat large1 |
|
100 | 100 | large11 |
|
101 | 101 | $ cat sub/normal2 |
|
102 | 102 | normal22 |
|
103 | 103 | $ cat sub/large2 |
|
104 | 104 | large22 |
|
105 | 105 | $ cd ../archive2 |
|
106 | 106 | $ ls |
|
107 | 107 | sub |
|
108 | 108 | $ cat sub/normal2 |
|
109 | 109 | normal22 |
|
110 | 110 | $ cat sub/large2 |
|
111 | 111 | large22 |
|
112 | 112 | $ cd ../archive3 |
|
113 | 113 | $ cat normal1 |
|
114 | 114 | normal22 |
|
115 | 115 | $ cat large1 |
|
116 | 116 | large22 |
|
117 | 117 | $ cat sub/normal2 |
|
118 | 118 | normal22 |
|
119 | 119 | $ cat sub/large2 |
|
120 | 120 | large22 |
|
121 | 121 | $ cd ../archive4 |
|
122 | 122 | $ cat normal3 |
|
123 | 123 | normal22 |
|
124 | 124 | $ cat large3 |
|
125 | 125 | large22 |
|
126 | 126 | $ cat sub/normal4 |
|
127 | 127 | normal22 |
|
128 | 128 | $ cat sub/large4 |
|
129 | 129 | large22 |
|
130 | 130 | |
|
131 | 131 | Commit corner case: specify files to commit. |
|
132 | 132 | |
|
133 | 133 | $ cd ../a |
|
134 | 134 | $ echo normal3 > normal3 |
|
135 | 135 | $ echo large3 > large3 |
|
136 | 136 | $ echo normal4 > sub/normal4 |
|
137 | 137 | $ echo large4 > sub/large4 |
|
138 | 138 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
139 | 139 | $ cat normal3 |
|
140 | 140 | normal3 |
|
141 | 141 | $ cat large3 |
|
142 | 142 | large3 |
|
143 | 143 | $ cat sub/normal4 |
|
144 | 144 | normal4 |
|
145 | 145 | $ cat sub/large4 |
|
146 | 146 | large4 |
|
147 | 147 | |
|
148 | 148 | One more commit corner case: commit from a subdirectory. |
|
149 | 149 | |
|
150 | 150 | $ cd ../a |
|
151 | 151 | $ echo normal33 > normal3 |
|
152 | 152 | $ echo large33 > large3 |
|
153 | 153 | $ echo normal44 > sub/normal4 |
|
154 | 154 | $ echo large44 > sub/large4 |
|
155 | 155 | $ cd sub |
|
156 | 156 | $ hg commit -m "edit files yet again" |
|
157 | 157 | $ cat ../normal3 |
|
158 | 158 | normal33 |
|
159 | 159 | $ cat ../large3 |
|
160 | 160 | large33 |
|
161 | 161 | $ cat normal4 |
|
162 | 162 | normal44 |
|
163 | 163 | $ cat large4 |
|
164 | 164 | large44 |
|
165 | 165 | |
|
166 | 166 | Committing standins is not allowed. |
|
167 | 167 | |
|
168 | 168 | $ cd .. |
|
169 | 169 | $ echo large3 > large3 |
|
170 | 170 | $ hg commit .hglf/large3 -m "try to commit standin" |
|
171 | 171 | abort: file ".hglf/large3" is a largefile standin |
|
172 | 172 | (commit the largefile itself instead) |
|
173 | 173 | [255] |
|
174 | 174 | |
|
175 | 175 | Corner cases for adding largefiles. |
|
176 | 176 | |
|
177 | 177 | $ echo large5 > large5 |
|
178 | 178 | $ hg add --large large5 |
|
179 | 179 | $ hg add --large large5 |
|
180 | 180 | large5 already a largefile |
|
181 | 181 | $ mkdir sub2 |
|
182 | 182 | $ echo large6 > sub2/large6 |
|
183 | 183 | $ echo large7 > sub2/large7 |
|
184 | 184 | $ hg add --large sub2 |
|
185 | 185 | adding sub2/large6 as a largefile |
|
186 | 186 | adding sub2/large7 as a largefile |
|
187 | 187 | $ hg st |
|
188 | 188 | M large3 |
|
189 | 189 | A large5 |
|
190 | 190 | A sub2/large6 |
|
191 | 191 | A sub2/large7 |
|
192 | 192 | |
|
193 | 193 | Config settings (pattern **.dat, minsize 2 MB) are respected. |
|
194 | 194 | |
|
195 | 195 | $ echo testdata > test.dat |
|
196 | 196 | $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null |
|
197 | 197 | $ hg add |
|
198 | 198 | adding reallylarge as a largefile |
|
199 | 199 | adding test.dat as a largefile |
|
200 | 200 | |
|
201 | 201 | Test that minsize and --lfsize handle float values; |
|
202 | 202 | also tests that --lfsize overrides largefiles.minsize. |
|
203 | 203 | (0.250 MB = 256 kB = 262144 B) |
|
204 | 204 | |
|
205 | 205 | $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null |
|
206 | 206 | $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null |
|
207 | 207 | $ hg --config largefiles.minsize=.25 add |
|
208 | 208 | adding ratherlarge as a largefile |
|
209 | 209 | adding medium |
|
210 | 210 | $ hg forget medium |
|
211 | 211 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
212 | 212 | adding medium as a largefile |
|
213 | 213 | $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null |
|
214 | 214 | $ hg --config largefiles.minsize=.25 add --lfsize=.125 |
|
215 | 215 | adding notlarge |
|
216 | 216 | $ hg forget notlarge |
|
217 | 217 | |
|
218 | 218 | Test forget on largefiles. |
|
219 | 219 | |
|
220 | 220 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
221 | 221 | $ hg st |
|
222 | 222 | A sub2/large6 |
|
223 | 223 | A sub2/large7 |
|
224 | 224 | R large3 |
|
225 | 225 | ? large5 |
|
226 | 226 | ? medium |
|
227 | 227 | ? notlarge |
|
228 | 228 | ? ratherlarge |
|
229 | 229 | ? reallylarge |
|
230 | 230 | ? test.dat |
|
231 | 231 | $ hg commit -m "add/edit more largefiles" |
|
232 | 232 | $ hg st |
|
233 | 233 | ? large3 |
|
234 | 234 | ? large5 |
|
235 | 235 | ? medium |
|
236 | 236 | ? notlarge |
|
237 | 237 | ? ratherlarge |
|
238 | 238 | ? reallylarge |
|
239 | 239 | ? test.dat |
|
240 | 240 | |
|
241 | 241 | Purge with largefiles: verify that largefiles are still in the working |
|
242 | 242 | dir after a purge. |
|
243 | 243 | |
|
244 | 244 | $ hg purge --all |
|
245 | 245 | $ cat sub/large4 |
|
246 | 246 | large44 |
|
247 | 247 | $ cat sub2/large6 |
|
248 | 248 | large6 |
|
249 | 249 | $ cat sub2/large7 |
|
250 | 250 | large7 |
|
251 | 251 | |
|
252 | 252 | Clone a largefiles repo. |
|
253 | 253 | |
|
254 | 254 | $ cd .. |
|
255 | 255 | $ hg clone a b |
|
256 | 256 | updating to branch default |
|
257 | 257 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
258 | 258 | getting changed largefiles |
|
259 | 259 | 3 largefiles updated, 0 removed |
|
260 | 260 | $ cd b |
|
261 | 261 | $ hg log |
|
262 | 262 | changeset: 7:daea875e9014 |
|
263 | 263 | tag: tip |
|
264 | 264 | user: test |
|
265 | 265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
266 | 266 | summary: add/edit more largefiles |
|
267 | 267 | |
|
268 | 268 | changeset: 6:4355d653f84f |
|
269 | 269 | user: test |
|
270 | 270 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
271 | 271 | summary: edit files yet again |
|
272 | 272 | |
|
273 | 273 | changeset: 5:9d5af5072dbd |
|
274 | 274 | user: test |
|
275 | 275 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
276 | 276 | summary: edit files again |
|
277 | 277 | |
|
278 | 278 | changeset: 4:74c02385b94c |
|
279 | 279 | user: test |
|
280 | 280 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
281 | 281 | summary: move files |
|
282 | 282 | |
|
283 | 283 | changeset: 3:9e8fbc4bce62 |
|
284 | 284 | user: test |
|
285 | 285 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
286 | 286 | summary: copy files |
|
287 | 287 | |
|
288 | 288 | changeset: 2:51a0ae4d5864 |
|
289 | 289 | user: test |
|
290 | 290 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
291 | 291 | summary: remove files |
|
292 | 292 | |
|
293 | 293 | changeset: 1:ce8896473775 |
|
294 | 294 | user: test |
|
295 | 295 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
296 | 296 | summary: edit files |
|
297 | 297 | |
|
298 | 298 | changeset: 0:30d30fe6a5be |
|
299 | 299 | user: test |
|
300 | 300 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
301 | 301 | summary: add files |
|
302 | 302 | |
|
303 | 303 | $ cat normal3 |
|
304 | 304 | normal33 |
|
305 | 305 | $ cat sub/normal4 |
|
306 | 306 | normal44 |
|
307 | 307 | $ cat sub/large4 |
|
308 | 308 | large44 |
|
309 | 309 | $ cat sub2/large6 |
|
310 | 310 | large6 |
|
311 | 311 | $ cat sub2/large7 |
|
312 | 312 | large7 |
|
313 | 313 | $ cd .. |
|
314 | 314 | $ hg clone a -r 3 c |
|
315 | 315 | adding changesets |
|
316 | 316 | adding manifests |
|
317 | 317 | adding file changes |
|
318 | 318 | added 4 changesets with 10 changes to 4 files |
|
319 | 319 | updating to branch default |
|
320 | 320 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
321 | 321 | getting changed largefiles |
|
322 | 322 | 2 largefiles updated, 0 removed |
|
323 | 323 | $ cd c |
|
324 | 324 | $ hg log |
|
325 | 325 | changeset: 3:9e8fbc4bce62 |
|
326 | 326 | tag: tip |
|
327 | 327 | user: test |
|
328 | 328 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
329 | 329 | summary: copy files |
|
330 | 330 | |
|
331 | 331 | changeset: 2:51a0ae4d5864 |
|
332 | 332 | user: test |
|
333 | 333 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
334 | 334 | summary: remove files |
|
335 | 335 | |
|
336 | 336 | changeset: 1:ce8896473775 |
|
337 | 337 | user: test |
|
338 | 338 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
339 | 339 | summary: edit files |
|
340 | 340 | |
|
341 | 341 | changeset: 0:30d30fe6a5be |
|
342 | 342 | user: test |
|
343 | 343 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
344 | 344 | summary: add files |
|
345 | 345 | |
|
346 | 346 | $ cat normal1 |
|
347 | 347 | normal22 |
|
348 | 348 | $ cat large1 |
|
349 | 349 | large22 |
|
350 | 350 | $ cat sub/normal2 |
|
351 | 351 | normal22 |
|
352 | 352 | $ cat sub/large2 |
|
353 | 353 | large22 |
|
354 | 354 | |
|
355 | 355 | Old revisions of a clone have correct largefiles content (this also |
|
356 | 356 | tests update). |
|
357 | 357 | |
|
358 | 358 | $ hg update -r 1 |
|
359 | 359 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
360 | 360 | getting changed largefiles |
|
361 | 361 | 1 largefiles updated, 0 removed |
|
362 | 362 | $ cat large1 |
|
363 | 363 | large11 |
|
364 | 364 | $ cat sub/large2 |
|
365 | 365 | large22 |
|
366 | 366 | |
|
367 | 367 | Rebasing between two repositories does not revert largefiles to old |
|
368 | 368 | revisions (this was a very bad bug that took a lot of work to fix). |
|
369 | 369 | |
|
370 | 370 | $ cd .. |
|
371 | 371 | $ hg clone a d |
|
372 | 372 | updating to branch default |
|
373 | 373 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
374 | 374 | getting changed largefiles |
|
375 | 375 | 3 largefiles updated, 0 removed |
|
376 | 376 | $ cd b |
|
377 | 377 | $ echo large4-modified > sub/large4 |
|
378 | 378 | $ echo normal3-modified > normal3 |
|
379 | 379 | $ hg commit -m "modify normal file and largefile in repo b" |
|
380 | 380 | $ cd ../d |
|
381 | 381 | $ echo large6-modified > sub2/large6 |
|
382 | 382 | $ echo normal4-modified > sub/normal4 |
|
383 | 383 | $ hg commit -m "modify normal file largefile in repo d" |
|
384 | 384 | $ cd .. |
|
385 | 385 | $ hg clone d e |
|
386 | 386 | updating to branch default |
|
387 | 387 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
388 | 388 | getting changed largefiles |
|
389 | 389 | 3 largefiles updated, 0 removed |
|
390 | 390 | $ cd d |
|
391 | 391 | $ hg pull --rebase ../b |
|
392 | 392 | pulling from ../b |
|
393 | 393 | searching for changes |
|
394 | 394 | adding changesets |
|
395 | 395 | adding manifests |
|
396 | 396 | adding file changes |
|
397 | 397 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
398 | 398 | getting changed largefiles |
|
399 | 399 | 1 largefiles updated, 0 removed |
|
400 | 400 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg |
|
401 | 401 | nothing to rebase |
|
402 | 402 | $ hg log |
|
403 | 403 | changeset: 9:598410d3eb9a |
|
404 | 404 | tag: tip |
|
405 | 405 | user: test |
|
406 | 406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
407 | 407 | summary: modify normal file largefile in repo d |
|
408 | 408 | |
|
409 | 409 | changeset: 8:a381d2c8c80e |
|
410 | 410 | user: test |
|
411 | 411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | 412 | summary: modify normal file and largefile in repo b |
|
413 | 413 | |
|
414 | 414 | changeset: 7:daea875e9014 |
|
415 | 415 | user: test |
|
416 | 416 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | 417 | summary: add/edit more largefiles |
|
418 | 418 | |
|
419 | 419 | changeset: 6:4355d653f84f |
|
420 | 420 | user: test |
|
421 | 421 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | 422 | summary: edit files yet again |
|
423 | 423 | |
|
424 | 424 | changeset: 5:9d5af5072dbd |
|
425 | 425 | user: test |
|
426 | 426 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | 427 | summary: edit files again |
|
428 | 428 | |
|
429 | 429 | changeset: 4:74c02385b94c |
|
430 | 430 | user: test |
|
431 | 431 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 | 432 | summary: move files |
|
433 | 433 | |
|
434 | 434 | changeset: 3:9e8fbc4bce62 |
|
435 | 435 | user: test |
|
436 | 436 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
437 | 437 | summary: copy files |
|
438 | 438 | |
|
439 | 439 | changeset: 2:51a0ae4d5864 |
|
440 | 440 | user: test |
|
441 | 441 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | 442 | summary: remove files |
|
443 | 443 | |
|
444 | 444 | changeset: 1:ce8896473775 |
|
445 | 445 | user: test |
|
446 | 446 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
447 | 447 | summary: edit files |
|
448 | 448 | |
|
449 | 449 | changeset: 0:30d30fe6a5be |
|
450 | 450 | user: test |
|
451 | 451 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
452 | 452 | summary: add files |
|
453 | 453 | |
|
454 | 454 | $ cat normal3 |
|
455 | 455 | normal3-modified |
|
456 | 456 | $ cat sub/normal4 |
|
457 | 457 | normal4-modified |
|
458 | 458 | $ cat sub/large4 |
|
459 | 459 | large4-modified |
|
460 | 460 | $ cat sub2/large6 |
|
461 | 461 | large6-modified |
|
462 | 462 | $ cat sub2/large7 |
|
463 | 463 | large7 |
|
464 | 464 | $ cd ../e |
|
465 | 465 | $ hg pull ../b |
|
466 | 466 | pulling from ../b |
|
467 | 467 | searching for changes |
|
468 | 468 | adding changesets |
|
469 | 469 | adding manifests |
|
470 | 470 | adding file changes |
|
471 | 471 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
472 | 472 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
473 | 473 | $ hg rebase |
|
474 | 474 | getting changed largefiles |
|
475 | 475 | 1 largefiles updated, 0 removed |
|
476 | 476 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg |
|
477 | 477 | $ hg log |
|
478 | 478 | changeset: 9:598410d3eb9a |
|
479 | 479 | tag: tip |
|
480 | 480 | user: test |
|
481 | 481 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
482 | 482 | summary: modify normal file largefile in repo d |
|
483 | 483 | |
|
484 | 484 | changeset: 8:a381d2c8c80e |
|
485 | 485 | user: test |
|
486 | 486 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
487 | 487 | summary: modify normal file and largefile in repo b |
|
488 | 488 | |
|
489 | 489 | changeset: 7:daea875e9014 |
|
490 | 490 | user: test |
|
491 | 491 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
492 | 492 | summary: add/edit more largefiles |
|
493 | 493 | |
|
494 | 494 | changeset: 6:4355d653f84f |
|
495 | 495 | user: test |
|
496 | 496 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
497 | 497 | summary: edit files yet again |
|
498 | 498 | |
|
499 | 499 | changeset: 5:9d5af5072dbd |
|
500 | 500 | user: test |
|
501 | 501 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
502 | 502 | summary: edit files again |
|
503 | 503 | |
|
504 | 504 | changeset: 4:74c02385b94c |
|
505 | 505 | user: test |
|
506 | 506 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
507 | 507 | summary: move files |
|
508 | 508 | |
|
509 | 509 | changeset: 3:9e8fbc4bce62 |
|
510 | 510 | user: test |
|
511 | 511 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
512 | 512 | summary: copy files |
|
513 | 513 | |
|
514 | 514 | changeset: 2:51a0ae4d5864 |
|
515 | 515 | user: test |
|
516 | 516 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
517 | 517 | summary: remove files |
|
518 | 518 | |
|
519 | 519 | changeset: 1:ce8896473775 |
|
520 | 520 | user: test |
|
521 | 521 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
522 | 522 | summary: edit files |
|
523 | 523 | |
|
524 | 524 | changeset: 0:30d30fe6a5be |
|
525 | 525 | user: test |
|
526 | 526 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
527 | 527 | summary: add files |
|
528 | 528 | |
|
529 | 529 | $ cat normal3 |
|
530 | 530 | normal3-modified |
|
531 | 531 | $ cat sub/normal4 |
|
532 | 532 | normal4-modified |
|
533 | 533 | $ cat sub/large4 |
|
534 | 534 | large4-modified |
|
535 | 535 | $ cat sub2/large6 |
|
536 | 536 | large6-modified |
|
537 | 537 | $ cat sub2/large7 |
|
538 | 538 | large7 |
|
539 | 539 | |
|
540 | 540 | Rollback on largefiles. |
|
541 | 541 | |
|
542 | 542 | $ echo large4-modified-again > sub/large4 |
|
543 | 543 | $ hg commit -m "Modify large4 again" |
|
544 | 544 | $ hg rollback |
|
545 | 545 | repository tip rolled back to revision 9 (undo commit) |
|
546 | 546 | working directory now based on revision 9 |
|
547 | 547 | $ hg st |
|
548 | 548 | M sub/large4 |
|
549 | 549 | $ hg log |
|
550 | 550 | changeset: 9:598410d3eb9a |
|
551 | 551 | tag: tip |
|
552 | 552 | user: test |
|
553 | 553 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
554 | 554 | summary: modify normal file largefile in repo d |
|
555 | 555 | |
|
556 | 556 | changeset: 8:a381d2c8c80e |
|
557 | 557 | user: test |
|
558 | 558 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
559 | 559 | summary: modify normal file and largefile in repo b |
|
560 | 560 | |
|
561 | 561 | changeset: 7:daea875e9014 |
|
562 | 562 | user: test |
|
563 | 563 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
564 | 564 | summary: add/edit more largefiles |
|
565 | 565 | |
|
566 | 566 | changeset: 6:4355d653f84f |
|
567 | 567 | user: test |
|
568 | 568 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
569 | 569 | summary: edit files yet again |
|
570 | 570 | |
|
571 | 571 | changeset: 5:9d5af5072dbd |
|
572 | 572 | user: test |
|
573 | 573 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
574 | 574 | summary: edit files again |
|
575 | 575 | |
|
576 | 576 | changeset: 4:74c02385b94c |
|
577 | 577 | user: test |
|
578 | 578 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
579 | 579 | summary: move files |
|
580 | 580 | |
|
581 | 581 | changeset: 3:9e8fbc4bce62 |
|
582 | 582 | user: test |
|
583 | 583 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
584 | 584 | summary: copy files |
|
585 | 585 | |
|
586 | 586 | changeset: 2:51a0ae4d5864 |
|
587 | 587 | user: test |
|
588 | 588 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
589 | 589 | summary: remove files |
|
590 | 590 | |
|
591 | 591 | changeset: 1:ce8896473775 |
|
592 | 592 | user: test |
|
593 | 593 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
594 | 594 | summary: edit files |
|
595 | 595 | |
|
596 | 596 | changeset: 0:30d30fe6a5be |
|
597 | 597 | user: test |
|
598 | 598 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
599 | 599 | summary: add files |
|
600 | 600 | |
|
601 | 601 | $ cat sub/large4 |
|
602 | 602 | large4-modified-again |
|
603 | 603 | |
|
604 | 604 | "update --check" refuses to update with uncommitted changes. |
|
605 | 605 | $ hg update --check 8 |
|
606 | 606 | abort: uncommitted local changes |
|
607 | 607 | [255] |
|
608 | 608 | |
|
609 | 609 | "update --clean" leaves correct largefiles in working copy. |
|
610 | 610 | |
|
611 | 611 | $ hg update --clean |
|
612 | 612 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
613 | 613 | getting changed largefiles |
|
614 | 614 | 1 largefiles updated, 0 removed |
|
615 | 615 | $ cat normal3 |
|
616 | 616 | normal3-modified |
|
617 | 617 | $ cat sub/normal4 |
|
618 | 618 | normal4-modified |
|
619 | 619 | $ cat sub/large4 |
|
620 | 620 | large4-modified |
|
621 | 621 | $ cat sub2/large6 |
|
622 | 622 | large6-modified |
|
623 | 623 | $ cat sub2/large7 |
|
624 | 624 | large7 |
|
625 | 625 | |
|
626 | 626 | Now "update check" is happy. |
|
627 | 627 | $ hg update --check 8 |
|
628 | 628 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
629 | 629 | getting changed largefiles |
|
630 | 630 | 1 largefiles updated, 0 removed |
|
631 | 631 | $ hg update --check |
|
632 | 632 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
633 | 633 | getting changed largefiles |
|
634 | 634 | 1 largefiles updated, 0 removed |
|
635 | 635 | |
|
636 | 636 | "revert" works on largefiles (and normal files too). |
|
637 | 637 | $ echo hack3 >> normal3 |
|
638 | 638 | $ echo hack4 >> sub/normal4 |
|
639 | 639 | $ echo hack4 >> sub/large4 |
|
640 | 640 | $ hg rm sub2/large6 |
|
641 | 641 | $ echo new >> sub2/large8 |
|
642 | 642 | $ hg add --large sub2/large8 |
|
643 | 643 | # XXX we don't really want to report that we're reverting the standin; |
|
644 | 644 | # that's just an implementation detail. But I don't see an obvious fix. ;-( |
|
645 | 645 | $ hg revert sub |
|
646 | 646 | reverting .hglf/sub/large4 |
|
647 | 647 | reverting sub/normal4 |
|
648 | 648 | $ hg status |
|
649 | 649 | M normal3 |
|
650 | 650 | A sub2/large8 |
|
651 | 651 | R sub2/large6 |
|
652 | 652 | ? sub/large4.orig |
|
653 | 653 | ? sub/normal4.orig |
|
654 | 654 | $ cat sub/normal4 |
|
655 | 655 | normal4-modified |
|
656 | 656 | $ cat sub/large4 |
|
657 | 657 | large4-modified |
|
658 | 658 | $ hg revert -a --no-backup |
|
659 | 659 | undeleting .hglf/sub2/large6 |
|
660 | 660 | forgetting .hglf/sub2/large8 |
|
661 | 661 | reverting normal3 |
|
662 | 662 | $ hg status |
|
663 | 663 | ? sub/large4.orig |
|
664 | 664 | ? sub/normal4.orig |
|
665 | 665 | ? sub2/large8 |
|
666 | 666 | $ cat normal3 |
|
667 | 667 | normal3-modified |
|
668 | 668 | $ cat sub2/large6 |
|
669 | 669 | large6-modified |
|
670 | 670 | $ rm sub/*.orig sub2/large8 |
|
671 | 671 | |
|
672 | 672 | revert some files to an older revision |
|
673 | 673 | $ hg revert --no-backup -r 8 sub2 |
|
674 | 674 | reverting .hglf/sub2/large6 |
|
675 | 675 | $ cat sub2/large6 |
|
676 | 676 | large6 |
|
677 | 677 | $ hg revert --no-backup sub2 |
|
678 | 678 | reverting .hglf/sub2/large6 |
|
679 | 679 | $ hg status |
|
680 | 680 | |
|
681 | 681 | "verify --large" actually verifies largefiles |
|
682 | 682 | |
|
683 | 683 | $ hg verify --large |
|
684 | 684 | checking changesets |
|
685 | 685 | checking manifests |
|
686 | 686 | crosschecking files in changesets and manifests |
|
687 | 687 | checking files |
|
688 | 688 | 10 files, 10 changesets, 28 total revisions |
|
689 | 689 | searching 1 changesets for largefiles |
|
690 | 690 | verified existence of 3 revisions of 3 largefiles |
|
691 | 691 | |
|
692 | 692 | Merging does not revert to old versions of largefiles (this has also |
|
693 | 693 | been very problematic). |
|
694 | 694 | |
|
695 | 695 | $ cd .. |
|
696 | 696 | $ hg clone -r 7 e f |
|
697 | 697 | adding changesets |
|
698 | 698 | adding manifests |
|
699 | 699 | adding file changes |
|
700 | 700 | added 8 changesets with 24 changes to 10 files |
|
701 | 701 | updating to branch default |
|
702 | 702 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
703 | 703 | getting changed largefiles |
|
704 | 704 | 3 largefiles updated, 0 removed |
|
705 | 705 | $ cd f |
|
706 | 706 | $ echo "large4-merge-test" > sub/large4 |
|
707 | 707 | $ hg commit -m "Modify large4 to test merge" |
|
708 | 708 | $ hg pull ../e |
|
709 | 709 | pulling from ../e |
|
710 | 710 | searching for changes |
|
711 | 711 | adding changesets |
|
712 | 712 | adding manifests |
|
713 | 713 | adding file changes |
|
714 | 714 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
715 | 715 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
716 | 716 | $ hg merge |
|
717 | 717 | merging sub/large4 |
|
718 | 718 | largefile sub/large4 has a merge conflict |
|
719 | 719 | keep (l)ocal or take (o)ther? l |
|
720 | 720 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
721 | 721 | (branch merge, don't forget to commit) |
|
722 | 722 | getting changed largefiles |
|
723 | 723 | 1 largefiles updated, 0 removed |
|
724 | 724 | $ hg commit -m "Merge repos e and f" |
|
725 | 725 | $ cat normal3 |
|
726 | 726 | normal3-modified |
|
727 | 727 | $ cat sub/normal4 |
|
728 | 728 | normal4-modified |
|
729 | 729 | $ cat sub/large4 |
|
730 | 730 | large4-merge-test |
|
731 | 731 | $ cat sub2/large6 |
|
732 | 732 | large6-modified |
|
733 | 733 | $ cat sub2/large7 |
|
734 | 734 | large7 |
|
735 | 735 | $ cd .. |
|
736 | 736 | |
|
737 | 737 | vanilla clients not locked out from largefiles servers on vanilla repos |
|
738 | 738 | $ mkdir r1 |
|
739 | 739 | $ cd r1 |
|
740 | 740 | $ hg init |
|
741 | 741 | $ echo c1 > f1 |
|
742 | 742 | $ hg add f1 |
|
743 | 743 | $ hg com -m "m1" |
|
744 | 744 | $ cd .. |
|
745 | 745 | $ hg serve -R r1 -d -p 8001 --pid-file serve.pid |
|
746 | 746 | $ hg --config extensions.largefiles=! clone http://localhost:8001 r2 |
|
747 | 747 | requesting all changes |
|
748 | 748 | adding changesets |
|
749 | 749 | adding manifests |
|
750 | 750 | adding file changes |
|
751 | 751 | added 1 changesets with 1 changes to 1 files |
|
752 | 752 | updating to branch default |
|
753 | 753 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
754 | 754 | $ kill `cat serve.pid` |
|
755 | 755 | |
|
756 | 756 | largefiles clients still work with vanilla servers |
|
757 | 757 | $ hg --config extensions.largefiles=! serve -R r1 -d -p 8001 --pid-file serve.pid |
|
758 | 758 | $ hg clone http://localhost:8001 r3 |
|
759 | 759 | requesting all changes |
|
760 | 760 | adding changesets |
|
761 | 761 | adding manifests |
|
762 | 762 | adding file changes |
|
763 | 763 | added 1 changesets with 1 changes to 1 files |
|
764 | 764 | updating to branch default |
|
765 | 765 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
766 | 766 | $ kill `cat serve.pid` |
|
767 | 767 | |
|
768 | 768 | vanilla clients locked out from largefiles http repos |
|
769 | 769 | $ mkdir r4 |
|
770 | 770 | $ cd r4 |
|
771 | 771 | $ hg init |
|
772 | 772 | $ echo c1 > f1 |
|
773 | 773 | $ hg add --large f1 |
|
774 | 774 | $ hg com -m "m1" |
|
775 | 775 | $ cd .. |
|
776 | 776 | $ hg serve -R r4 -d -p 8001 --pid-file serve.pid |
|
777 | 777 | $ hg --config extensions.largefiles=! clone http://localhost:8001 r5 |
|
778 | 778 | abort: remote error: |
|
779 | 779 | |
|
780 | 780 | This repository uses the largefiles extension. |
|
781 | 781 | |
|
782 | 782 | Please enable it in your Mercurial config file. |
|
783 | 783 | [255] |
|
784 | 784 | $ kill `cat serve.pid` |
|
785 | 785 | |
|
786 | 786 | vanilla clients locked out from largefiles ssh repos |
|
787 | 787 | $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5 |
|
788 | 788 | abort: remote error: |
|
789 | 789 | |
|
790 | 790 | This repository uses the largefiles extension. |
|
791 | 791 | |
|
792 | 792 | Please enable it in your Mercurial config file. |
|
793 | 793 | [255] |
|
794 | 794 | |
|
795 | 795 | largefiles clients refuse to push largefiles repos to vanilla servers |
|
796 | 796 | $ mkdir r6 |
|
797 | 797 | $ cd r6 |
|
798 | 798 | $ hg init |
|
799 | 799 | $ echo c1 > f1 |
|
800 | 800 | $ hg add f1 |
|
801 | 801 | $ hg com -m "m1" |
|
802 | 802 | $ cat >> .hg/hgrc <<! |
|
803 | 803 | > [web] |
|
804 | 804 | > push_ssl = false |
|
805 | 805 | > allow_push = * |
|
806 | 806 | > ! |
|
807 | 807 | $ cd .. |
|
808 | 808 | $ hg clone r6 r7 |
|
809 | 809 | updating to branch default |
|
810 | 810 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
811 | 811 | $ cd r7 |
|
812 | 812 | $ echo c2 > f2 |
|
813 | 813 | $ hg add --large f2 |
|
814 | 814 | $ hg com -m "m2" |
|
815 | 815 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p 8001 --pid-file ../serve.pid |
|
816 | 816 | $ hg push http://localhost:8001 |
|
817 | 817 | pushing to http://localhost:8001/ |
|
818 | 818 | searching for changes |
|
819 | 819 | abort: http://localhost:8001/ does not appear to be a largefile store |
|
820 | 820 | [255] |
|
821 | 821 | $ cd .. |
|
822 | 822 | $ kill `cat serve.pid` |
|
823 | 823 | |
|
824 | 824 | $ cd .. |
|
825 | 825 | |
|
826 | 826 | Clone a local repository owned by another user |
|
827 | 827 | We have to simulate that here by setting $HOME and removing write permissions |
|
828 | 828 | $ ORIGHOME="$HOME" |
|
829 | 829 | $ mkdir alice |
|
830 | 830 | $ HOME="`pwd`/alice" |
|
831 | 831 | $ cd alice |
|
832 | 832 | $ hg init pubrepo |
|
833 | 833 | $ cd pubrepo |
|
834 | 834 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null |
|
835 | 835 | $ hg add --large a-large-file |
|
836 | 836 | $ hg commit -m "Add a large file" |
|
837 | 837 | $ cd .. |
|
838 | 838 | $ chmod -R a-w pubrepo |
|
839 | 839 | $ cd .. |
|
840 | 840 | $ mkdir bob |
|
841 | 841 | $ HOME="`pwd`/bob" |
|
842 | 842 | $ cd bob |
|
843 | $ hg clone ../alice/pubrepo pubrepo | |
|
843 | $ hg clone --pull ../alice/pubrepo pubrepo | |
|
844 | 844 | requesting all changes |
|
845 | 845 | adding changesets |
|
846 | 846 | adding manifests |
|
847 | 847 | adding file changes |
|
848 | 848 | added 1 changesets with 1 changes to 1 files |
|
849 | 849 | updating to branch default |
|
850 | 850 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
851 | 851 | getting changed largefiles |
|
852 | 852 | 1 largefiles updated, 0 removed |
|
853 | 853 | $ cd .. |
|
854 | 854 | $ HOME="$ORIGHOME" |
|
855 | 855 | |
|
856 | 856 | Symlink to a large largefile should behave the same as a symlink to a normal file |
|
857 | 857 | $ hg init largesymlink |
|
858 | 858 | $ cd largesymlink |
|
859 | 859 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
860 | 860 | $ hg add --large largefile |
|
861 | 861 | $ hg commit -m "commit a large file" |
|
862 | 862 | $ ln -s largefile largelink |
|
863 | 863 | $ hg add largelink |
|
864 | 864 | $ hg commit -m "commit a large symlink" |
|
865 | 865 | $ rm -f largelink |
|
866 | 866 | $ hg up >/dev/null |
|
867 | 867 | $ test -f largelink |
|
868 | 868 | [1] |
|
869 | 869 | $ test -L largelink |
|
870 | 870 | [1] |
|
871 | 871 | $ rm -f largelink # make next part of the test independent of the previous |
|
872 | 872 | $ hg up -C >/dev/null |
|
873 | 873 | $ test -f largelink |
|
874 | 874 | $ test -L largelink |
|
875 | 875 | $ cd .. |
|
876 | 876 | |
|
877 | 877 |
General Comments 0
You need to be logged in to leave comments.
Login now