##// END OF EJS Templates
largefiles: test that a largefile cannot accidentally be re-added as a regular file
Na'Tosha Bard -
r15382:b59e6b1e stable
parent child Browse files
Show More
@@ -1,880 +1,888
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 --check" refuses to update with uncommitted changes.
604 "update --check" refuses to update with uncommitted changes.
605 $ hg update --check 8
605 $ hg update --check 8
606 abort: uncommitted local changes
606 abort: uncommitted local changes
607 [255]
607 [255]
608
608
609 "update --clean" leaves correct largefiles in working copy.
609 "update --clean" leaves correct largefiles in working copy.
610
610
611 $ hg update --clean
611 $ hg update --clean
612 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
612 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
613 getting changed largefiles
613 getting changed largefiles
614 1 largefiles updated, 0 removed
614 1 largefiles updated, 0 removed
615 $ cat normal3
615 $ cat normal3
616 normal3-modified
616 normal3-modified
617 $ cat sub/normal4
617 $ cat sub/normal4
618 normal4-modified
618 normal4-modified
619 $ cat sub/large4
619 $ cat sub/large4
620 large4-modified
620 large4-modified
621 $ cat sub2/large6
621 $ cat sub2/large6
622 large6-modified
622 large6-modified
623 $ cat sub2/large7
623 $ cat sub2/large7
624 large7
624 large7
625
625
626 Now "update check" is happy.
626 Now "update check" is happy.
627 $ hg update --check 8
627 $ hg update --check 8
628 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
628 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
629 getting changed largefiles
629 getting changed largefiles
630 1 largefiles updated, 0 removed
630 1 largefiles updated, 0 removed
631 $ hg update --check
631 $ hg update --check
632 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
632 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
633 getting changed largefiles
633 getting changed largefiles
634 1 largefiles updated, 0 removed
634 1 largefiles updated, 0 removed
635
635
636 "revert" works on largefiles (and normal files too).
636 "revert" works on largefiles (and normal files too).
637 $ echo hack3 >> normal3
637 $ echo hack3 >> normal3
638 $ echo hack4 >> sub/normal4
638 $ echo hack4 >> sub/normal4
639 $ echo hack4 >> sub/large4
639 $ echo hack4 >> sub/large4
640 $ hg rm sub2/large6
640 $ hg rm sub2/large6
641 $ echo new >> sub2/large8
641 $ echo new >> sub2/large8
642 $ hg add --large sub2/large8
642 $ hg add --large sub2/large8
643 # XXX we don't really want to report that we're reverting the standin;
643 # XXX we don't really want to report that we're reverting the standin;
644 # that's just an implementation detail. But I don't see an obvious fix. ;-(
644 # that's just an implementation detail. But I don't see an obvious fix. ;-(
645 $ hg revert sub
645 $ hg revert sub
646 reverting .hglf/sub/large4
646 reverting .hglf/sub/large4
647 reverting sub/normal4
647 reverting sub/normal4
648 $ hg status
648 $ hg status
649 M normal3
649 M normal3
650 A sub2/large8
650 A sub2/large8
651 R sub2/large6
651 R sub2/large6
652 ? sub/large4.orig
652 ? sub/large4.orig
653 ? sub/normal4.orig
653 ? sub/normal4.orig
654 $ cat sub/normal4
654 $ cat sub/normal4
655 normal4-modified
655 normal4-modified
656 $ cat sub/large4
656 $ cat sub/large4
657 large4-modified
657 large4-modified
658 $ hg revert -a --no-backup
658 $ hg revert -a --no-backup
659 undeleting .hglf/sub2/large6
659 undeleting .hglf/sub2/large6
660 forgetting .hglf/sub2/large8
660 forgetting .hglf/sub2/large8
661 reverting normal3
661 reverting normal3
662 $ hg status
662 $ hg status
663 ? sub/large4.orig
663 ? sub/large4.orig
664 ? sub/normal4.orig
664 ? sub/normal4.orig
665 ? sub2/large8
665 ? sub2/large8
666 $ cat normal3
666 $ cat normal3
667 normal3-modified
667 normal3-modified
668 $ cat sub2/large6
668 $ cat sub2/large6
669 large6-modified
669 large6-modified
670 $ rm sub/*.orig sub2/large8
670 $ rm sub/*.orig sub2/large8
671
671
672 revert some files to an older revision
672 revert some files to an older revision
673 $ hg revert --no-backup -r 8 sub2
673 $ hg revert --no-backup -r 8 sub2
674 reverting .hglf/sub2/large6
674 reverting .hglf/sub2/large6
675 $ cat sub2/large6
675 $ cat sub2/large6
676 large6
676 large6
677 $ hg revert --no-backup sub2
677 $ hg revert --no-backup sub2
678 reverting .hglf/sub2/large6
678 reverting .hglf/sub2/large6
679 $ hg status
679 $ hg status
680
680
681 "verify --large" actually verifies largefiles
681 "verify --large" actually verifies largefiles
682
682
683 $ hg verify --large
683 $ hg verify --large
684 checking changesets
684 checking changesets
685 checking manifests
685 checking manifests
686 crosschecking files in changesets and manifests
686 crosschecking files in changesets and manifests
687 checking files
687 checking files
688 10 files, 10 changesets, 28 total revisions
688 10 files, 10 changesets, 28 total revisions
689 searching 1 changesets for largefiles
689 searching 1 changesets for largefiles
690 verified existence of 3 revisions of 3 largefiles
690 verified existence of 3 revisions of 3 largefiles
691
691
692 Merging does not revert to old versions of largefiles (this has also
692 Merging does not revert to old versions of largefiles (this has also
693 been very problematic).
693 been very problematic).
694
694
695 $ cd ..
695 $ cd ..
696 $ hg clone -r 7 e f
696 $ hg clone -r 7 e f
697 adding changesets
697 adding changesets
698 adding manifests
698 adding manifests
699 adding file changes
699 adding file changes
700 added 8 changesets with 24 changes to 10 files
700 added 8 changesets with 24 changes to 10 files
701 updating to branch default
701 updating to branch default
702 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
702 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
703 getting changed largefiles
703 getting changed largefiles
704 3 largefiles updated, 0 removed
704 3 largefiles updated, 0 removed
705 $ cd f
705 $ cd f
706 $ echo "large4-merge-test" > sub/large4
706 $ echo "large4-merge-test" > sub/large4
707 $ hg commit -m "Modify large4 to test merge"
707 $ hg commit -m "Modify large4 to test merge"
708 $ hg pull ../e
708 $ hg pull ../e
709 pulling from ../e
709 pulling from ../e
710 searching for changes
710 searching for changes
711 adding changesets
711 adding changesets
712 adding manifests
712 adding manifests
713 adding file changes
713 adding file changes
714 added 2 changesets with 4 changes to 4 files (+1 heads)
714 added 2 changesets with 4 changes to 4 files (+1 heads)
715 (run 'hg heads' to see heads, 'hg merge' to merge)
715 (run 'hg heads' to see heads, 'hg merge' to merge)
716 $ hg merge
716 $ hg merge
717 merging sub/large4
717 merging sub/large4
718 largefile sub/large4 has a merge conflict
718 largefile sub/large4 has a merge conflict
719 keep (l)ocal or take (o)ther? l
719 keep (l)ocal or take (o)ther? l
720 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
720 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
721 (branch merge, don't forget to commit)
721 (branch merge, don't forget to commit)
722 getting changed largefiles
722 getting changed largefiles
723 1 largefiles updated, 0 removed
723 1 largefiles updated, 0 removed
724 $ hg commit -m "Merge repos e and f"
724 $ hg commit -m "Merge repos e and f"
725 $ cat normal3
725 $ cat normal3
726 normal3-modified
726 normal3-modified
727 $ cat sub/normal4
727 $ cat sub/normal4
728 normal4-modified
728 normal4-modified
729 $ cat sub/large4
729 $ cat sub/large4
730 large4-merge-test
730 large4-merge-test
731 $ cat sub2/large6
731 $ cat sub2/large6
732 large6-modified
732 large6-modified
733 $ cat sub2/large7
733 $ cat sub2/large7
734 large7
734 large7
735
736 Test that a normal file and a largefile with the same name and path cannot
737 coexist.
738
739 $ rm sub2/large7
740 $ echo "largeasnormal" > sub2/large7
741 $ hg add sub2/large7
742 sub2/large7 already a largefile
735 $ cd ..
743 $ cd ..
736
744
737 vanilla clients not locked out from largefiles servers on vanilla repos
745 vanilla clients not locked out from largefiles servers on vanilla repos
738 $ mkdir r1
746 $ mkdir r1
739 $ cd r1
747 $ cd r1
740 $ hg init
748 $ hg init
741 $ echo c1 > f1
749 $ echo c1 > f1
742 $ hg add f1
750 $ hg add f1
743 $ hg com -m "m1"
751 $ hg com -m "m1"
744 $ cd ..
752 $ cd ..
745 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
753 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
746 $ cat hg.pid >> $DAEMON_PIDS
754 $ cat hg.pid >> $DAEMON_PIDS
747 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
755 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
748 requesting all changes
756 requesting all changes
749 adding changesets
757 adding changesets
750 adding manifests
758 adding manifests
751 adding file changes
759 adding file changes
752 added 1 changesets with 1 changes to 1 files
760 added 1 changesets with 1 changes to 1 files
753 updating to branch default
761 updating to branch default
754 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
762 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
755
763
756 largefiles clients still work with vanilla servers
764 largefiles clients still work with vanilla servers
757 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
765 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
758 $ cat hg.pid >> $DAEMON_PIDS
766 $ cat hg.pid >> $DAEMON_PIDS
759 $ hg clone http://localhost:$HGPORT1 r3
767 $ hg clone http://localhost:$HGPORT1 r3
760 requesting all changes
768 requesting all changes
761 adding changesets
769 adding changesets
762 adding manifests
770 adding manifests
763 adding file changes
771 adding file changes
764 added 1 changesets with 1 changes to 1 files
772 added 1 changesets with 1 changes to 1 files
765 updating to branch default
773 updating to branch default
766 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
774 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
767
775
768 vanilla clients locked out from largefiles http repos
776 vanilla clients locked out from largefiles http repos
769 $ mkdir r4
777 $ mkdir r4
770 $ cd r4
778 $ cd r4
771 $ hg init
779 $ hg init
772 $ echo c1 > f1
780 $ echo c1 > f1
773 $ hg add --large f1
781 $ hg add --large f1
774 $ hg com -m "m1"
782 $ hg com -m "m1"
775 $ cd ..
783 $ cd ..
776 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
784 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
777 $ cat hg.pid >> $DAEMON_PIDS
785 $ cat hg.pid >> $DAEMON_PIDS
778 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
786 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
779 abort: remote error:
787 abort: remote error:
780
788
781 This repository uses the largefiles extension.
789 This repository uses the largefiles extension.
782
790
783 Please enable it in your Mercurial config file.
791 Please enable it in your Mercurial config file.
784 [255]
792 [255]
785
793
786 used all HGPORTs, kill all daemons
794 used all HGPORTs, kill all daemons
787 $ "$TESTDIR/killdaemons.py"
795 $ "$TESTDIR/killdaemons.py"
788
796
789 vanilla clients locked out from largefiles ssh repos
797 vanilla clients locked out from largefiles ssh repos
790 $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5
798 $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5
791 abort: remote error:
799 abort: remote error:
792
800
793 This repository uses the largefiles extension.
801 This repository uses the largefiles extension.
794
802
795 Please enable it in your Mercurial config file.
803 Please enable it in your Mercurial config file.
796 [255]
804 [255]
797
805
798 largefiles clients refuse to push largefiles repos to vanilla servers
806 largefiles clients refuse to push largefiles repos to vanilla servers
799 $ mkdir r6
807 $ mkdir r6
800 $ cd r6
808 $ cd r6
801 $ hg init
809 $ hg init
802 $ echo c1 > f1
810 $ echo c1 > f1
803 $ hg add f1
811 $ hg add f1
804 $ hg com -m "m1"
812 $ hg com -m "m1"
805 $ cat >> .hg/hgrc <<!
813 $ cat >> .hg/hgrc <<!
806 > [web]
814 > [web]
807 > push_ssl = false
815 > push_ssl = false
808 > allow_push = *
816 > allow_push = *
809 > !
817 > !
810 $ cd ..
818 $ cd ..
811 $ hg clone r6 r7
819 $ hg clone r6 r7
812 updating to branch default
820 updating to branch default
813 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
821 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
814 $ cd r7
822 $ cd r7
815 $ echo c2 > f2
823 $ echo c2 > f2
816 $ hg add --large f2
824 $ hg add --large f2
817 $ hg com -m "m2"
825 $ hg com -m "m2"
818 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
826 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
819 $ cat ../hg.pid >> $DAEMON_PIDS
827 $ cat ../hg.pid >> $DAEMON_PIDS
820 $ hg push http://localhost:$HGPORT
828 $ hg push http://localhost:$HGPORT
821 pushing to http://localhost:$HGPORT/
829 pushing to http://localhost:$HGPORT/
822 searching for changes
830 searching for changes
823 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
831 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
824 [255]
832 [255]
825 $ cd ..
833 $ cd ..
826
834
827 $ cd ..
835 $ cd ..
828
836
829 Clone a local repository owned by another user
837 Clone a local repository owned by another user
830 We have to simulate that here by setting $HOME and removing write permissions
838 We have to simulate that here by setting $HOME and removing write permissions
831 $ ORIGHOME="$HOME"
839 $ ORIGHOME="$HOME"
832 $ mkdir alice
840 $ mkdir alice
833 $ HOME="`pwd`/alice"
841 $ HOME="`pwd`/alice"
834 $ cd alice
842 $ cd alice
835 $ hg init pubrepo
843 $ hg init pubrepo
836 $ cd pubrepo
844 $ cd pubrepo
837 $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null
845 $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null
838 $ hg add --large a-large-file
846 $ hg add --large a-large-file
839 $ hg commit -m "Add a large file"
847 $ hg commit -m "Add a large file"
840 $ cd ..
848 $ cd ..
841 $ chmod -R a-w pubrepo
849 $ chmod -R a-w pubrepo
842 $ cd ..
850 $ cd ..
843 $ mkdir bob
851 $ mkdir bob
844 $ HOME="`pwd`/bob"
852 $ HOME="`pwd`/bob"
845 $ cd bob
853 $ cd bob
846 $ hg clone --pull ../alice/pubrepo pubrepo
854 $ hg clone --pull ../alice/pubrepo pubrepo
847 requesting all changes
855 requesting all changes
848 adding changesets
856 adding changesets
849 adding manifests
857 adding manifests
850 adding file changes
858 adding file changes
851 added 1 changesets with 1 changes to 1 files
859 added 1 changesets with 1 changes to 1 files
852 updating to branch default
860 updating to branch default
853 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
861 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
854 getting changed largefiles
862 getting changed largefiles
855 1 largefiles updated, 0 removed
863 1 largefiles updated, 0 removed
856 $ cd ..
864 $ cd ..
857 $ HOME="$ORIGHOME"
865 $ HOME="$ORIGHOME"
858
866
859 Symlink to a large largefile should behave the same as a symlink to a normal file
867 Symlink to a large largefile should behave the same as a symlink to a normal file
860 $ hg init largesymlink
868 $ hg init largesymlink
861 $ cd largesymlink
869 $ cd largesymlink
862 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
870 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
863 $ hg add --large largefile
871 $ hg add --large largefile
864 $ hg commit -m "commit a large file"
872 $ hg commit -m "commit a large file"
865 $ ln -s largefile largelink
873 $ ln -s largefile largelink
866 $ hg add largelink
874 $ hg add largelink
867 $ hg commit -m "commit a large symlink"
875 $ hg commit -m "commit a large symlink"
868 $ rm -f largelink
876 $ rm -f largelink
869 $ hg up >/dev/null
877 $ hg up >/dev/null
870 $ test -f largelink
878 $ test -f largelink
871 [1]
879 [1]
872 $ test -L largelink
880 $ test -L largelink
873 [1]
881 [1]
874 $ rm -f largelink # make next part of the test independent of the previous
882 $ rm -f largelink # make next part of the test independent of the previous
875 $ hg up -C >/dev/null
883 $ hg up -C >/dev/null
876 $ test -f largelink
884 $ test -f largelink
877 $ test -L largelink
885 $ test -L largelink
878 $ cd ..
886 $ cd ..
879
887
880
888
General Comments 0
You need to be logged in to leave comments. Login now