Show More
@@ -1,745 +1,743 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 |
$ dd bs= |
|
|
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 --clean" leaves correct largefiles in working copy. |
|
605 | 605 | |
|
606 | 606 | $ hg update --clean |
|
607 | 607 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
608 | 608 | getting changed largefiles |
|
609 | 609 | 1 largefiles updated, 0 removed |
|
610 | 610 | $ cat normal3 |
|
611 | 611 | normal3-modified |
|
612 | 612 | $ cat sub/normal4 |
|
613 | 613 | normal4-modified |
|
614 | 614 | $ cat sub/large4 |
|
615 | 615 | large4-modified |
|
616 | 616 | $ cat sub2/large6 |
|
617 | 617 | large6-modified |
|
618 | 618 | $ cat sub2/large7 |
|
619 | 619 | large7 |
|
620 | 620 | |
|
621 | 621 | "verify --large" actaully verifies largefiles |
|
622 | 622 | |
|
623 | 623 | $ hg verify --large |
|
624 | 624 | checking changesets |
|
625 | 625 | checking manifests |
|
626 | 626 | crosschecking files in changesets and manifests |
|
627 | 627 | checking files |
|
628 | 628 | 10 files, 10 changesets, 28 total revisions |
|
629 | 629 | searching 1 changesets for largefiles |
|
630 | 630 | verified existence of 3 revisions of 3 largefiles |
|
631 | 631 | |
|
632 | 632 | Merging does not revert to old versions of largefiles (this has also |
|
633 | 633 | been very problematic). |
|
634 | 634 | |
|
635 | 635 | $ cd .. |
|
636 | 636 | $ hg clone -r 7 e f |
|
637 | 637 | adding changesets |
|
638 | 638 | adding manifests |
|
639 | 639 | adding file changes |
|
640 | 640 | added 8 changesets with 24 changes to 10 files |
|
641 | 641 | updating to branch default |
|
642 | 642 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
643 | 643 | getting changed largefiles |
|
644 | 644 | 3 largefiles updated, 0 removed |
|
645 | 645 | $ cd f |
|
646 | 646 | $ echo "large4-merge-test" > sub/large4 |
|
647 | 647 | $ hg commit -m "Modify large4 to test merge" |
|
648 | 648 | $ hg pull ../e |
|
649 | 649 | pulling from ../e |
|
650 | 650 | searching for changes |
|
651 | 651 | adding changesets |
|
652 | 652 | adding manifests |
|
653 | 653 | adding file changes |
|
654 | 654 | added 2 changesets with 4 changes to 4 files (+1 heads) |
|
655 | 655 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
656 | 656 | $ hg merge |
|
657 | 657 | merging sub/large4 |
|
658 | 658 | largefile sub/large4 has a merge conflict |
|
659 | 659 | keep (l)ocal or take (o)ther? l |
|
660 | 660 | 3 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
661 | 661 | (branch merge, don't forget to commit) |
|
662 | 662 | getting changed largefiles |
|
663 | 663 | 1 largefiles updated, 0 removed |
|
664 | 664 | $ hg commit -m "Merge repos e and f" |
|
665 | 665 | $ cat normal3 |
|
666 | 666 | normal3-modified |
|
667 | 667 | $ cat sub/normal4 |
|
668 | 668 | normal4-modified |
|
669 | 669 | $ cat sub/large4 |
|
670 | 670 | large4-merge-test |
|
671 | 671 | $ cat sub2/large6 |
|
672 | 672 | large6-modified |
|
673 | 673 | $ cat sub2/large7 |
|
674 | 674 | large7 |
|
675 | 675 | $ cd .. |
|
676 | 676 | |
|
677 | 677 | "lfconvert" works |
|
678 | 678 | $ hg init bigfile-repo |
|
679 | 679 | $ cd bigfile-repo |
|
680 |
$ dd if=/dev/zero bs=1k count=2 |
|
|
680 | $ dd if=/dev/zero bs=1k count=256 > a-large-file 2> /dev/null | |
|
681 | 681 | $ hg addremove |
|
682 | 682 | adding a-large-file |
|
683 | a-large-file: up to 72 MB of RAM may be required to manage this file | |
|
684 | (use 'hg revert a-large-file' to cancel the pending addition) | |
|
685 | $ hg commit -m "Commit file without making it be a largefile" | |
|
683 | $ hg commit -m "add a-large-file (as a normal file)" | |
|
686 | 684 | $ find .hg/largefiles |
|
687 | 685 | .hg/largefiles |
|
688 | 686 | $ cd .. |
|
689 |
$ hg lfconvert --size |
|
|
687 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo | |
|
690 | 688 | initializing destination largefiles-repo |
|
691 | 689 | |
|
692 | 690 | "lfconvert" adds 'largefiles' to .hg/requires. |
|
693 | 691 | $ cat largefiles-repo/.hg/requires |
|
694 | 692 | largefiles |
|
695 | 693 | revlogv1 |
|
696 | 694 | fncache |
|
697 | 695 | store |
|
698 | 696 | dotencode |
|
699 | 697 | |
|
700 | 698 | "lfconvert" includes a newline at the end of the standin files. |
|
701 | 699 | $ cd largefiles-repo |
|
702 | 700 | $ hg up |
|
703 | 701 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
704 | 702 | getting changed largefiles |
|
705 | 703 | 1 largefiles updated, 0 removed |
|
706 | 704 | $ cat .hglf/a-large-file |
|
707 | 8b0629c630f530cde051aeb42ce561756738fbe7 | |
|
708 |
$ dd if=/dev/zero bs=1k count=1 |
|
|
709 | $ hg add another-large-file | |
|
710 |
$ hg commit -m " |
|
|
705 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 | |
|
706 | $ dd if=/dev/zero bs=1k count=1k > another-large-file 2> /dev/null | |
|
707 | $ hg add --lfsize=1 another-large-file | |
|
708 | $ hg commit -m "add another-large-file (should be a largefile)" | |
|
711 | 709 | $ cat .hglf/a-large-file .hglf/another-large-file |
|
712 | 8b0629c630f530cde051aeb42ce561756738fbe7 | |
|
713 | 187a0f76e02aac9c24f71c820be1f34ef1c76e76 | |
|
710 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 | |
|
711 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 | |
|
714 | 712 | $ cd .. |
|
715 | 713 | $ rm -rf bigfile-repo largefiles-repo |
|
716 | 714 | |
|
717 | 715 | Clone a local repository owned by another user |
|
718 | 716 | We have to simulate that here by setting $HOME and removing write permissions |
|
719 | 717 | $ ORIGHOME="$HOME" |
|
720 | 718 | $ mkdir alice |
|
721 | 719 | $ HOME="`pwd`/alice" |
|
722 | 720 | $ cd alice |
|
723 | 721 | $ hg init pubrepo |
|
724 | 722 | $ cd pubrepo |
|
725 | 723 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null |
|
726 | 724 | $ hg add --large a-large-file |
|
727 | 725 | $ hg commit -m "Add a large file" |
|
728 | 726 | $ cd .. |
|
729 | 727 | $ chmod -R a-w pubrepo |
|
730 | 728 | $ cd .. |
|
731 | 729 | $ mkdir bob |
|
732 | 730 | $ HOME="`pwd`/bob" |
|
733 | 731 | $ cd bob |
|
734 | 732 | $ hg clone ../alice/pubrepo pubrepo |
|
735 | 733 | requesting all changes |
|
736 | 734 | adding changesets |
|
737 | 735 | adding manifests |
|
738 | 736 | adding file changes |
|
739 | 737 | added 1 changesets with 1 changes to 1 files |
|
740 | 738 | updating to branch default |
|
741 | 739 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
742 | 740 | getting changed largefiles |
|
743 | 741 | 1 largefiles updated, 0 removed |
|
744 | 742 | $ cd .. |
|
745 | 743 | $ HOME="$ORIGHOME" |
General Comments 0
You need to be logged in to leave comments.
Login now