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