##// END OF EJS Templates
tests: enable test-largefiles.t on Windows MSYS...
Mads Kiilerich -
r17089:0c1d1035 default
parent child Browse files
Show More
@@ -1,1221 +1,1233 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
1 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
3 $ mkdir -p ${USERCACHE}
2 $ mkdir -p "${USERCACHE}"
4 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
5 > [extensions]
4 > [extensions]
6 > largefiles=
5 > largefiles=
7 > purge=
6 > purge=
8 > rebase=
7 > rebase=
9 > transplant=
8 > transplant=
10 > [phases]
9 > [phases]
11 > publish=False
10 > publish=False
12 > [largefiles]
11 > [largefiles]
13 > minsize=2
12 > minsize=2
14 > patterns=glob:**.dat
13 > patterns=glob:**.dat
15 > usercache=${USERCACHE}
14 > usercache=${USERCACHE}
16 > [hooks]
15 > [hooks]
17 > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
16 > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
18 > EOF
17 > EOF
19
18
20 Create the repo with a couple of revisions of both large and normal
19 Create the repo with a couple of revisions of both large and normal
21 files, testing that status correctly shows largefiles and that summary output
20 files, testing that status correctly shows largefiles and that summary output
22 is correct.
21 is correct.
23
22
24 $ hg init a
23 $ hg init a
25 $ cd a
24 $ cd a
26 $ mkdir sub
25 $ mkdir sub
27 $ echo normal1 > normal1
26 $ echo normal1 > normal1
28 $ echo normal2 > sub/normal2
27 $ echo normal2 > sub/normal2
29 $ echo large1 > large1
28 $ echo large1 > large1
30 $ echo large2 > sub/large2
29 $ echo large2 > sub/large2
31 $ hg add normal1 sub/normal2
30 $ hg add normal1 sub/normal2
32 $ hg add --large large1 sub/large2
31 $ hg add --large large1 sub/large2
33 $ hg commit -m "add files"
32 $ hg commit -m "add files"
34 Invoking status precommit hook
33 Invoking status precommit hook
35 A large1
34 A large1
36 A normal1
35 A normal1
37 A sub/large2
36 A sub/large2
38 A sub/normal2
37 A sub/normal2
39 $ echo normal11 > normal1
38 $ echo normal11 > normal1
40 $ echo normal22 > sub/normal2
39 $ echo normal22 > sub/normal2
41 $ echo large11 > large1
40 $ echo large11 > large1
42 $ echo large22 > sub/large2
41 $ echo large22 > sub/large2
43 $ hg commit -m "edit files"
42 $ hg commit -m "edit files"
44 Invoking status precommit hook
43 Invoking status precommit hook
45 M large1
44 M large1
46 M normal1
45 M normal1
47 M sub/large2
46 M sub/large2
48 M sub/normal2
47 M sub/normal2
49 $ hg sum --large
48 $ hg sum --large
50 parent: 1:ce8896473775 tip
49 parent: 1:ce8896473775 tip
51 edit files
50 edit files
52 branch: default
51 branch: default
53 commit: (clean)
52 commit: (clean)
54 update: (current)
53 update: (current)
55 largefiles: No remote repo
54 largefiles: No remote repo
56
55
57 Commit preserved largefile contents.
56 Commit preserved largefile contents.
58
57
59 $ cat normal1
58 $ cat normal1
60 normal11
59 normal11
61 $ cat large1
60 $ cat large1
62 large11
61 large11
63 $ cat sub/normal2
62 $ cat sub/normal2
64 normal22
63 normal22
65 $ cat sub/large2
64 $ cat sub/large2
66 large22
65 large22
67
66
68 Test status, subdir and unknown files
67 Test status, subdir and unknown files
69
68
70 $ echo unknown > sub/unknown
69 $ echo unknown > sub/unknown
71 $ hg st --all
70 $ hg st --all
72 ? sub/unknown
71 ? sub/unknown
73 C large1
72 C large1
74 C normal1
73 C normal1
75 C sub/large2
74 C sub/large2
76 C sub/normal2
75 C sub/normal2
77 $ hg st --all sub
76 $ hg st --all sub
78 ? sub/unknown
77 ? sub/unknown
79 C sub/large2
78 C sub/large2
80 C sub/normal2
79 C sub/normal2
81 $ rm sub/unknown
80 $ rm sub/unknown
82
81
83 Remove both largefiles and normal files.
82 Remove both largefiles and normal files.
84
83
85 $ hg remove normal1 large1
84 $ hg remove normal1 large1
86 $ hg status large1
85 $ hg status large1
87 R large1
86 R large1
88 $ hg commit -m "remove files"
87 $ hg commit -m "remove files"
89 Invoking status precommit hook
88 Invoking status precommit hook
90 R large1
89 R large1
91 R normal1
90 R normal1
92 $ ls
91 $ ls
93 sub
92 sub
94 $ echo "testlargefile" > large1-test
93 $ echo "testlargefile" > large1-test
95 $ hg add --large large1-test
94 $ hg add --large large1-test
96 $ hg st
95 $ hg st
97 A large1-test
96 A large1-test
98 $ hg rm large1-test
97 $ hg rm large1-test
99 not removing large1-test: file has been marked for add (use forget to undo)
98 not removing large1-test: file has been marked for add (use forget to undo)
100 $ hg st
99 $ hg st
101 A large1-test
100 A large1-test
102 $ hg forget large1-test
101 $ hg forget large1-test
103 $ hg st
102 $ hg st
104 ? large1-test
103 ? large1-test
105 $ rm large1-test
104 $ rm large1-test
106
105
107 Copy both largefiles and normal files (testing that status output is correct).
106 Copy both largefiles and normal files (testing that status output is correct).
108
107
109 $ hg cp sub/normal2 normal1
108 $ hg cp sub/normal2 normal1
110 $ hg cp sub/large2 large1
109 $ hg cp sub/large2 large1
111 $ hg commit -m "copy files"
110 $ hg commit -m "copy files"
112 Invoking status precommit hook
111 Invoking status precommit hook
113 A large1
112 A large1
114 A normal1
113 A normal1
115 $ cat normal1
114 $ cat normal1
116 normal22
115 normal22
117 $ cat large1
116 $ cat large1
118 large22
117 large22
119
118
120 Test moving largefiles and verify that normal files are also unaffected.
119 Test moving largefiles and verify that normal files are also unaffected.
121
120
122 $ hg mv normal1 normal3
121 $ hg mv normal1 normal3
123 $ hg mv large1 large3
122 $ hg mv large1 large3
124 $ hg mv sub/normal2 sub/normal4
123 $ hg mv sub/normal2 sub/normal4
125 $ hg mv sub/large2 sub/large4
124 $ hg mv sub/large2 sub/large4
126 $ hg commit -m "move files"
125 $ hg commit -m "move files"
127 Invoking status precommit hook
126 Invoking status precommit hook
128 A large3
127 A large3
129 A normal3
128 A normal3
130 A sub/large4
129 A sub/large4
131 A sub/normal4
130 A sub/normal4
132 R large1
131 R large1
133 R normal1
132 R normal1
134 R sub/large2
133 R sub/large2
135 R sub/normal2
134 R sub/normal2
136 $ cat normal3
135 $ cat normal3
137 normal22
136 normal22
138 $ cat large3
137 $ cat large3
139 large22
138 large22
140 $ cat sub/normal4
139 $ cat sub/normal4
141 normal22
140 normal22
142 $ cat sub/large4
141 $ cat sub/large4
143 large22
142 large22
144
143
144 #if hgweb
145 Test display of largefiles in hgweb
145 Test display of largefiles in hgweb
146
146
147 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
147 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
148 $ cat ../hg.pid >> $DAEMON_PIDS
148 $ cat ../hg.pid >> $DAEMON_PIDS
149 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
149 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
150 200 Script output follows
150 200 Script output follows
151
151
152
152
153 drwxr-xr-x sub
153 drwxr-xr-x sub
154 -rw-r--r-- 41 large3
154 -rw-r--r-- 41 large3
155 -rw-r--r-- 9 normal3
155 -rw-r--r-- 9 normal3
156
156
157
157
158 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
158 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
159 200 Script output follows
159 200 Script output follows
160
160
161
161
162 -rw-r--r-- 41 large4
162 -rw-r--r-- 41 large4
163 -rw-r--r-- 9 normal4
163 -rw-r--r-- 9 normal4
164
164
165
165
166 $ "$TESTDIR/killdaemons.py"
166 $ "$TESTDIR/killdaemons.py"
167 #endif
167
168
168 Test archiving the various revisions. These hit corner cases known with
169 Test archiving the various revisions. These hit corner cases known with
169 archiving.
170 archiving.
170
171
171 $ hg archive -r 0 ../archive0
172 $ hg archive -r 0 ../archive0
172 $ hg archive -r 1 ../archive1
173 $ hg archive -r 1 ../archive1
173 $ hg archive -r 2 ../archive2
174 $ hg archive -r 2 ../archive2
174 $ hg archive -r 3 ../archive3
175 $ hg archive -r 3 ../archive3
175 $ hg archive -r 4 ../archive4
176 $ hg archive -r 4 ../archive4
176 $ cd ../archive0
177 $ cd ../archive0
177 $ cat normal1
178 $ cat normal1
178 normal1
179 normal1
179 $ cat large1
180 $ cat large1
180 large1
181 large1
181 $ cat sub/normal2
182 $ cat sub/normal2
182 normal2
183 normal2
183 $ cat sub/large2
184 $ cat sub/large2
184 large2
185 large2
185 $ cd ../archive1
186 $ cd ../archive1
186 $ cat normal1
187 $ cat normal1
187 normal11
188 normal11
188 $ cat large1
189 $ cat large1
189 large11
190 large11
190 $ cat sub/normal2
191 $ cat sub/normal2
191 normal22
192 normal22
192 $ cat sub/large2
193 $ cat sub/large2
193 large22
194 large22
194 $ cd ../archive2
195 $ cd ../archive2
195 $ ls
196 $ ls
196 sub
197 sub
197 $ cat sub/normal2
198 $ cat sub/normal2
198 normal22
199 normal22
199 $ cat sub/large2
200 $ cat sub/large2
200 large22
201 large22
201 $ cd ../archive3
202 $ cd ../archive3
202 $ cat normal1
203 $ cat normal1
203 normal22
204 normal22
204 $ cat large1
205 $ cat large1
205 large22
206 large22
206 $ cat sub/normal2
207 $ cat sub/normal2
207 normal22
208 normal22
208 $ cat sub/large2
209 $ cat sub/large2
209 large22
210 large22
210 $ cd ../archive4
211 $ cd ../archive4
211 $ cat normal3
212 $ cat normal3
212 normal22
213 normal22
213 $ cat large3
214 $ cat large3
214 large22
215 large22
215 $ cat sub/normal4
216 $ cat sub/normal4
216 normal22
217 normal22
217 $ cat sub/large4
218 $ cat sub/large4
218 large22
219 large22
219
220
220 Commit corner case: specify files to commit.
221 Commit corner case: specify files to commit.
221
222
222 $ cd ../a
223 $ cd ../a
223 $ echo normal3 > normal3
224 $ echo normal3 > normal3
224 $ echo large3 > large3
225 $ echo large3 > large3
225 $ echo normal4 > sub/normal4
226 $ echo normal4 > sub/normal4
226 $ echo large4 > sub/large4
227 $ echo large4 > sub/large4
227 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
228 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
228 Invoking status precommit hook
229 Invoking status precommit hook
229 M large3
230 M large3
230 M normal3
231 M normal3
231 M sub/large4
232 M sub/large4
232 M sub/normal4
233 M sub/normal4
233 $ cat normal3
234 $ cat normal3
234 normal3
235 normal3
235 $ cat large3
236 $ cat large3
236 large3
237 large3
237 $ cat sub/normal4
238 $ cat sub/normal4
238 normal4
239 normal4
239 $ cat sub/large4
240 $ cat sub/large4
240 large4
241 large4
241
242
242 One more commit corner case: commit from a subdirectory.
243 One more commit corner case: commit from a subdirectory.
243
244
244 $ cd ../a
245 $ cd ../a
245 $ echo normal33 > normal3
246 $ echo normal33 > normal3
246 $ echo large33 > large3
247 $ echo large33 > large3
247 $ echo normal44 > sub/normal4
248 $ echo normal44 > sub/normal4
248 $ echo large44 > sub/large4
249 $ echo large44 > sub/large4
249 $ cd sub
250 $ cd sub
250 $ hg commit -m "edit files yet again"
251 $ hg commit -m "edit files yet again"
251 Invoking status precommit hook
252 Invoking status precommit hook
252 M large3
253 M large3
253 M normal3
254 M normal3
254 M sub/large4
255 M sub/large4
255 M sub/normal4
256 M sub/normal4
256 $ cat ../normal3
257 $ cat ../normal3
257 normal33
258 normal33
258 $ cat ../large3
259 $ cat ../large3
259 large33
260 large33
260 $ cat normal4
261 $ cat normal4
261 normal44
262 normal44
262 $ cat large4
263 $ cat large4
263 large44
264 large44
264
265
265 Committing standins is not allowed.
266 Committing standins is not allowed.
266
267
267 $ cd ..
268 $ cd ..
268 $ echo large3 > large3
269 $ echo large3 > large3
269 $ hg commit .hglf/large3 -m "try to commit standin"
270 $ hg commit .hglf/large3 -m "try to commit standin"
270 abort: file ".hglf/large3" is a largefile standin
271 abort: file ".hglf/large3" is a largefile standin
271 (commit the largefile itself instead)
272 (commit the largefile itself instead)
272 [255]
273 [255]
273
274
274 Corner cases for adding largefiles.
275 Corner cases for adding largefiles.
275
276
276 $ echo large5 > large5
277 $ echo large5 > large5
277 $ hg add --large large5
278 $ hg add --large large5
278 $ hg add --large large5
279 $ hg add --large large5
279 large5 already a largefile
280 large5 already a largefile
280 $ mkdir sub2
281 $ mkdir sub2
281 $ echo large6 > sub2/large6
282 $ echo large6 > sub2/large6
282 $ echo large7 > sub2/large7
283 $ echo large7 > sub2/large7
283 $ hg add --large sub2
284 $ hg add --large sub2
284 adding sub2/large6 as a largefile (glob)
285 adding sub2/large6 as a largefile (glob)
285 adding sub2/large7 as a largefile (glob)
286 adding sub2/large7 as a largefile (glob)
286 $ hg st
287 $ hg st
287 M large3
288 M large3
288 A large5
289 A large5
289 A sub2/large6
290 A sub2/large6
290 A sub2/large7
291 A sub2/large7
291
292
292 Test "hg status" with combination of 'file pattern' and 'directory
293 Test "hg status" with combination of 'file pattern' and 'directory
293 pattern' for largefiles:
294 pattern' for largefiles:
294
295
295 $ hg status sub2/large6 sub2
296 $ hg status sub2/large6 sub2
296 A sub2/large6
297 A sub2/large6
297 A sub2/large7
298 A sub2/large7
298
299
299 Config settings (pattern **.dat, minsize 2 MB) are respected.
300 Config settings (pattern **.dat, minsize 2 MB) are respected.
300
301
301 $ echo testdata > test.dat
302 $ echo testdata > test.dat
302 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
303 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
303 $ hg add
304 $ hg add
304 adding reallylarge as a largefile
305 adding reallylarge as a largefile
305 adding test.dat as a largefile
306 adding test.dat as a largefile
306
307
307 Test that minsize and --lfsize handle float values;
308 Test that minsize and --lfsize handle float values;
308 also tests that --lfsize overrides largefiles.minsize.
309 also tests that --lfsize overrides largefiles.minsize.
309 (0.250 MB = 256 kB = 262144 B)
310 (0.250 MB = 256 kB = 262144 B)
310
311
311 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
312 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
312 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
313 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
313 $ hg --config largefiles.minsize=.25 add
314 $ hg --config largefiles.minsize=.25 add
314 adding ratherlarge as a largefile
315 adding ratherlarge as a largefile
315 adding medium
316 adding medium
316 $ hg forget medium
317 $ hg forget medium
317 $ hg --config largefiles.minsize=.25 add --lfsize=.125
318 $ hg --config largefiles.minsize=.25 add --lfsize=.125
318 adding medium as a largefile
319 adding medium as a largefile
319 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
320 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
320 $ hg --config largefiles.minsize=.25 add --lfsize=.125
321 $ hg --config largefiles.minsize=.25 add --lfsize=.125
321 adding notlarge
322 adding notlarge
322 $ hg forget notlarge
323 $ hg forget notlarge
323
324
324 Test forget on largefiles.
325 Test forget on largefiles.
325
326
326 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
327 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
327 $ hg commit -m "add/edit more largefiles"
328 $ hg commit -m "add/edit more largefiles"
328 Invoking status precommit hook
329 Invoking status precommit hook
329 A sub2/large6
330 A sub2/large6
330 A sub2/large7
331 A sub2/large7
331 R large3
332 R large3
332 ? large5
333 ? large5
333 ? medium
334 ? medium
334 ? notlarge
335 ? notlarge
335 ? ratherlarge
336 ? ratherlarge
336 ? reallylarge
337 ? reallylarge
337 ? test.dat
338 ? test.dat
338 $ hg st
339 $ hg st
339 ? large3
340 ? large3
340 ? large5
341 ? large5
341 ? medium
342 ? medium
342 ? notlarge
343 ? notlarge
343 ? ratherlarge
344 ? ratherlarge
344 ? reallylarge
345 ? reallylarge
345 ? test.dat
346 ? test.dat
346
347
347 Purge with largefiles: verify that largefiles are still in the working
348 Purge with largefiles: verify that largefiles are still in the working
348 dir after a purge.
349 dir after a purge.
349
350
350 $ hg purge --all
351 $ hg purge --all
351 $ cat sub/large4
352 $ cat sub/large4
352 large44
353 large44
353 $ cat sub2/large6
354 $ cat sub2/large6
354 large6
355 large6
355 $ cat sub2/large7
356 $ cat sub2/large7
356 large7
357 large7
357
358
358 Test addremove: verify that files that should be added as largfiles are added as
359 Test addremove: verify that files that should be added as largfiles are added as
359 such and that already-existing largfiles are not added as normal files by
360 such and that already-existing largfiles are not added as normal files by
360 accident.
361 accident.
361
362
362 $ rm normal3
363 $ rm normal3
363 $ rm sub/large4
364 $ rm sub/large4
364 $ echo "testing addremove with patterns" > testaddremove.dat
365 $ echo "testing addremove with patterns" > testaddremove.dat
365 $ echo "normaladdremove" > normaladdremove
366 $ echo "normaladdremove" > normaladdremove
366 $ hg addremove
367 $ hg addremove
367 removing sub/large4
368 removing sub/large4
368 adding testaddremove.dat as a largefile
369 adding testaddremove.dat as a largefile
369 removing normal3
370 removing normal3
370 adding normaladdremove
371 adding normaladdremove
371
372
372 Clone a largefiles repo.
373 Clone a largefiles repo.
373
374
374 $ hg clone . ../b
375 $ hg clone . ../b
375 updating to branch default
376 updating to branch default
376 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
377 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
377 getting changed largefiles
378 getting changed largefiles
378 3 largefiles updated, 0 removed
379 3 largefiles updated, 0 removed
379 $ cd ../b
380 $ cd ../b
380 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
381 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
381 7:daea875e9014 add/edit more largefiles
382 7:daea875e9014 add/edit more largefiles
382 6:4355d653f84f edit files yet again
383 6:4355d653f84f edit files yet again
383 5:9d5af5072dbd edit files again
384 5:9d5af5072dbd edit files again
384 4:74c02385b94c move files
385 4:74c02385b94c move files
385 3:9e8fbc4bce62 copy files
386 3:9e8fbc4bce62 copy files
386 2:51a0ae4d5864 remove files
387 2:51a0ae4d5864 remove files
387 1:ce8896473775 edit files
388 1:ce8896473775 edit files
388 0:30d30fe6a5be add files
389 0:30d30fe6a5be add files
389 $ cat normal3
390 $ cat normal3
390 normal33
391 normal33
391 $ cat sub/normal4
392 $ cat sub/normal4
392 normal44
393 normal44
393 $ cat sub/large4
394 $ cat sub/large4
394 large44
395 large44
395 $ cat sub2/large6
396 $ cat sub2/large6
396 large6
397 large6
397 $ cat sub2/large7
398 $ cat sub2/large7
398 large7
399 large7
399 $ cd ..
400 $ cd ..
400 $ hg clone a -r 3 c
401 $ hg clone a -r 3 c
401 adding changesets
402 adding changesets
402 adding manifests
403 adding manifests
403 adding file changes
404 adding file changes
404 added 4 changesets with 10 changes to 4 files
405 added 4 changesets with 10 changes to 4 files
405 updating to branch default
406 updating to branch default
406 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
407 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
407 getting changed largefiles
408 getting changed largefiles
408 2 largefiles updated, 0 removed
409 2 largefiles updated, 0 removed
409 $ cd c
410 $ cd c
410 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
411 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
411 3:9e8fbc4bce62 copy files
412 3:9e8fbc4bce62 copy files
412 2:51a0ae4d5864 remove files
413 2:51a0ae4d5864 remove files
413 1:ce8896473775 edit files
414 1:ce8896473775 edit files
414 0:30d30fe6a5be add files
415 0:30d30fe6a5be add files
415 $ cat normal1
416 $ cat normal1
416 normal22
417 normal22
417 $ cat large1
418 $ cat large1
418 large22
419 large22
419 $ cat sub/normal2
420 $ cat sub/normal2
420 normal22
421 normal22
421 $ cat sub/large2
422 $ cat sub/large2
422 large22
423 large22
423
424
424 Old revisions of a clone have correct largefiles content (this also
425 Old revisions of a clone have correct largefiles content (this also
425 tests update).
426 tests update).
426
427
427 $ hg update -r 1
428 $ hg update -r 1
428 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 getting changed largefiles
430 getting changed largefiles
430 1 largefiles updated, 0 removed
431 1 largefiles updated, 0 removed
431 $ cat large1
432 $ cat large1
432 large11
433 large11
433 $ cat sub/large2
434 $ cat sub/large2
434 large22
435 large22
435 $ cd ..
436 $ cd ..
436
437
437 Test cloning with --all-largefiles flag
438 Test cloning with --all-largefiles flag
438
439
439 $ rm -Rf ${USERCACHE}/*
440 $ rm -Rf "${USERCACHE}"/*
440 $ hg clone --all-largefiles a a-backup
441 $ hg clone --all-largefiles a a-backup
441 updating to branch default
442 updating to branch default
442 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 getting changed largefiles
444 getting changed largefiles
444 3 largefiles updated, 0 removed
445 3 largefiles updated, 0 removed
445 8 additional largefiles cached
446 8 additional largefiles cached
446
447
447 $ hg clone --all-largefiles a ssh://localhost/a
448 $ hg clone --all-largefiles a ssh://localhost/a
448 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
449 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
449 [255]
450 [255]
450
451
451 Test pulling with --all-largefiles flag
452 Test pulling with --all-largefiles flag
452
453
453 $ rm -Rf a-backup
454 $ rm -Rf a-backup
454 $ hg clone -r 1 a a-backup
455 $ hg clone -r 1 a a-backup
455 adding changesets
456 adding changesets
456 adding manifests
457 adding manifests
457 adding file changes
458 adding file changes
458 added 2 changesets with 8 changes to 4 files
459 added 2 changesets with 8 changes to 4 files
459 updating to branch default
460 updating to branch default
460 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
461 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
461 getting changed largefiles
462 getting changed largefiles
462 2 largefiles updated, 0 removed
463 2 largefiles updated, 0 removed
463 $ rm -Rf ${USERCACHE}/*
464 $ rm -Rf "${USERCACHE}"/*
464 $ cd a-backup
465 $ cd a-backup
465 $ hg pull --all-largefiles
466 $ hg pull --all-largefiles
466 pulling from $TESTTMP/a (glob)
467 pulling from $TESTTMP/a (glob)
467 searching for changes
468 searching for changes
468 adding changesets
469 adding changesets
469 adding manifests
470 adding manifests
470 adding file changes
471 adding file changes
471 added 6 changesets with 16 changes to 8 files
472 added 6 changesets with 16 changes to 8 files
472 (run 'hg update' to get a working copy)
473 (run 'hg update' to get a working copy)
473 caching new largefiles
474 caching new largefiles
474 3 largefiles cached
475 3 largefiles cached
475 3 additional largefiles cached
476 3 additional largefiles cached
476 $ cd ..
477 $ cd ..
477
478
478 Rebasing between two repositories does not revert largefiles to old
479 Rebasing between two repositories does not revert largefiles to old
479 revisions (this was a very bad bug that took a lot of work to fix).
480 revisions (this was a very bad bug that took a lot of work to fix).
480
481
481 $ hg clone a d
482 $ hg clone a d
482 updating to branch default
483 updating to branch default
483 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
484 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
484 getting changed largefiles
485 getting changed largefiles
485 3 largefiles updated, 0 removed
486 3 largefiles updated, 0 removed
486 $ cd b
487 $ cd b
487 $ echo large4-modified > sub/large4
488 $ echo large4-modified > sub/large4
488 $ echo normal3-modified > normal3
489 $ echo normal3-modified > normal3
489 $ hg commit -m "modify normal file and largefile in repo b"
490 $ hg commit -m "modify normal file and largefile in repo b"
490 Invoking status precommit hook
491 Invoking status precommit hook
491 M normal3
492 M normal3
492 M sub/large4
493 M sub/large4
493 $ cd ../d
494 $ cd ../d
494 $ echo large6-modified > sub2/large6
495 $ echo large6-modified > sub2/large6
495 $ echo normal4-modified > sub/normal4
496 $ echo normal4-modified > sub/normal4
496 $ hg commit -m "modify normal file largefile in repo d"
497 $ hg commit -m "modify normal file largefile in repo d"
497 Invoking status precommit hook
498 Invoking status precommit hook
498 M sub/normal4
499 M sub/normal4
499 M sub2/large6
500 M sub2/large6
500 $ cd ..
501 $ cd ..
501 $ hg clone d e
502 $ hg clone d e
502 updating to branch default
503 updating to branch default
503 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
504 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
504 getting changed largefiles
505 getting changed largefiles
505 3 largefiles updated, 0 removed
506 3 largefiles updated, 0 removed
506 $ cd d
507 $ cd d
507 $ hg pull --rebase ../b
508 $ hg pull --rebase ../b
508 pulling from ../b
509 pulling from ../b
509 searching for changes
510 searching for changes
510 adding changesets
511 adding changesets
511 adding manifests
512 adding manifests
512 adding file changes
513 adding file changes
513 added 1 changesets with 2 changes to 2 files (+1 heads)
514 added 1 changesets with 2 changes to 2 files (+1 heads)
514 Invoking status precommit hook
515 Invoking status precommit hook
515 M sub/normal4
516 M sub/normal4
516 M sub2/large6
517 M sub2/large6
517 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
518 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
518 nothing to rebase
519 nothing to rebase
519 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
520 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
520 9:598410d3eb9a modify normal file largefile in repo d
521 9:598410d3eb9a modify normal file largefile in repo d
521 8:a381d2c8c80e modify normal file and largefile in repo b
522 8:a381d2c8c80e modify normal file and largefile in repo b
522 7:daea875e9014 add/edit more largefiles
523 7:daea875e9014 add/edit more largefiles
523 6:4355d653f84f edit files yet again
524 6:4355d653f84f edit files yet again
524 5:9d5af5072dbd edit files again
525 5:9d5af5072dbd edit files again
525 4:74c02385b94c move files
526 4:74c02385b94c move files
526 3:9e8fbc4bce62 copy files
527 3:9e8fbc4bce62 copy files
527 2:51a0ae4d5864 remove files
528 2:51a0ae4d5864 remove files
528 1:ce8896473775 edit files
529 1:ce8896473775 edit files
529 0:30d30fe6a5be add files
530 0:30d30fe6a5be add files
530 $ cat normal3
531 $ cat normal3
531 normal3-modified
532 normal3-modified
532 $ cat sub/normal4
533 $ cat sub/normal4
533 normal4-modified
534 normal4-modified
534 $ cat sub/large4
535 $ cat sub/large4
535 large4-modified
536 large4-modified
536 $ cat sub2/large6
537 $ cat sub2/large6
537 large6-modified
538 large6-modified
538 $ cat sub2/large7
539 $ cat sub2/large7
539 large7
540 large7
540 $ cd ../e
541 $ cd ../e
541 $ hg pull ../b
542 $ hg pull ../b
542 pulling from ../b
543 pulling from ../b
543 searching for changes
544 searching for changes
544 adding changesets
545 adding changesets
545 adding manifests
546 adding manifests
546 adding file changes
547 adding file changes
547 added 1 changesets with 2 changes to 2 files (+1 heads)
548 added 1 changesets with 2 changes to 2 files (+1 heads)
548 (run 'hg heads' to see heads, 'hg merge' to merge)
549 (run 'hg heads' to see heads, 'hg merge' to merge)
549 caching new largefiles
550 caching new largefiles
550 0 largefiles cached
551 0 largefiles cached
551 $ hg rebase
552 $ hg rebase
552 Invoking status precommit hook
553 Invoking status precommit hook
553 M sub/normal4
554 M sub/normal4
554 M sub2/large6
555 M sub2/large6
555 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
556 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
556 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
557 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
557 9:598410d3eb9a modify normal file largefile in repo d
558 9:598410d3eb9a modify normal file largefile in repo d
558 8:a381d2c8c80e modify normal file and largefile in repo b
559 8:a381d2c8c80e modify normal file and largefile in repo b
559 7:daea875e9014 add/edit more largefiles
560 7:daea875e9014 add/edit more largefiles
560 6:4355d653f84f edit files yet again
561 6:4355d653f84f edit files yet again
561 5:9d5af5072dbd edit files again
562 5:9d5af5072dbd edit files again
562 4:74c02385b94c move files
563 4:74c02385b94c move files
563 3:9e8fbc4bce62 copy files
564 3:9e8fbc4bce62 copy files
564 2:51a0ae4d5864 remove files
565 2:51a0ae4d5864 remove files
565 1:ce8896473775 edit files
566 1:ce8896473775 edit files
566 0:30d30fe6a5be add files
567 0:30d30fe6a5be add files
567 $ cat normal3
568 $ cat normal3
568 normal3-modified
569 normal3-modified
569 $ cat sub/normal4
570 $ cat sub/normal4
570 normal4-modified
571 normal4-modified
571 $ cat sub/large4
572 $ cat sub/large4
572 large4-modified
573 large4-modified
573 $ cat sub2/large6
574 $ cat sub2/large6
574 large6-modified
575 large6-modified
575 $ cat sub2/large7
576 $ cat sub2/large7
576 large7
577 large7
577
578
578 Rollback on largefiles.
579 Rollback on largefiles.
579
580
580 $ echo large4-modified-again > sub/large4
581 $ echo large4-modified-again > sub/large4
581 $ hg commit -m "Modify large4 again"
582 $ hg commit -m "Modify large4 again"
582 Invoking status precommit hook
583 Invoking status precommit hook
583 M sub/large4
584 M sub/large4
584 $ hg rollback
585 $ hg rollback
585 repository tip rolled back to revision 9 (undo commit)
586 repository tip rolled back to revision 9 (undo commit)
586 working directory now based on revision 9
587 working directory now based on revision 9
587 $ hg st
588 $ hg st
588 M sub/large4
589 M sub/large4
589 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
590 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
590 9:598410d3eb9a modify normal file largefile in repo d
591 9:598410d3eb9a modify normal file largefile in repo d
591 8:a381d2c8c80e modify normal file and largefile in repo b
592 8:a381d2c8c80e modify normal file and largefile in repo b
592 7:daea875e9014 add/edit more largefiles
593 7:daea875e9014 add/edit more largefiles
593 6:4355d653f84f edit files yet again
594 6:4355d653f84f edit files yet again
594 5:9d5af5072dbd edit files again
595 5:9d5af5072dbd edit files again
595 4:74c02385b94c move files
596 4:74c02385b94c move files
596 3:9e8fbc4bce62 copy files
597 3:9e8fbc4bce62 copy files
597 2:51a0ae4d5864 remove files
598 2:51a0ae4d5864 remove files
598 1:ce8896473775 edit files
599 1:ce8896473775 edit files
599 0:30d30fe6a5be add files
600 0:30d30fe6a5be add files
600 $ cat sub/large4
601 $ cat sub/large4
601 large4-modified-again
602 large4-modified-again
602
603
603 "update --check" refuses to update with uncommitted changes.
604 "update --check" refuses to update with uncommitted changes.
604 $ hg update --check 8
605 $ hg update --check 8
605 abort: uncommitted local changes
606 abort: uncommitted local changes
606 [255]
607 [255]
607
608
608 "update --clean" leaves correct largefiles in working copy.
609 "update --clean" leaves correct largefiles in working copy.
609
610
610 $ hg update --clean
611 $ hg update --clean
611 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
612 getting changed largefiles
613 getting changed largefiles
613 1 largefiles updated, 0 removed
614 1 largefiles updated, 0 removed
614 $ cat normal3
615 $ cat normal3
615 normal3-modified
616 normal3-modified
616 $ cat sub/normal4
617 $ cat sub/normal4
617 normal4-modified
618 normal4-modified
618 $ cat sub/large4
619 $ cat sub/large4
619 large4-modified
620 large4-modified
620 $ cat sub2/large6
621 $ cat sub2/large6
621 large6-modified
622 large6-modified
622 $ cat sub2/large7
623 $ cat sub2/large7
623 large7
624 large7
624
625
625 Now "update check" is happy.
626 Now "update check" is happy.
626 $ hg update --check 8
627 $ hg update --check 8
627 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
628 getting changed largefiles
629 getting changed largefiles
629 1 largefiles updated, 0 removed
630 1 largefiles updated, 0 removed
630 $ hg update --check
631 $ hg update --check
631 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
632 getting changed largefiles
633 getting changed largefiles
633 1 largefiles updated, 0 removed
634 1 largefiles updated, 0 removed
634
635
635 Test removing empty largefiles directories on update
636 Test removing empty largefiles directories on update
636 $ test -d sub2 && echo "sub2 exists"
637 $ test -d sub2 && echo "sub2 exists"
637 sub2 exists
638 sub2 exists
638 $ hg update -q null
639 $ hg update -q null
639 $ test -d sub2 && echo "error: sub2 should not exist anymore"
640 $ test -d sub2 && echo "error: sub2 should not exist anymore"
640 [1]
641 [1]
641 $ hg update -q
642 $ hg update -q
642
643
643 Test hg remove removes empty largefiles directories
644 Test hg remove removes empty largefiles directories
644 $ test -d sub2 && echo "sub2 exists"
645 $ test -d sub2 && echo "sub2 exists"
645 sub2 exists
646 sub2 exists
646 $ hg remove sub2/*
647 $ hg remove sub2/*
647 $ test -d sub2 && echo "error: sub2 should not exist anymore"
648 $ test -d sub2 && echo "error: sub2 should not exist anymore"
648 [1]
649 [1]
649 $ hg revert sub2/large6 sub2/large7
650 $ hg revert sub2/large6 sub2/large7
650
651
651 "revert" works on largefiles (and normal files too).
652 "revert" works on largefiles (and normal files too).
652 $ echo hack3 >> normal3
653 $ echo hack3 >> normal3
653 $ echo hack4 >> sub/normal4
654 $ echo hack4 >> sub/normal4
654 $ echo hack4 >> sub/large4
655 $ echo hack4 >> sub/large4
655 $ rm sub2/large6
656 $ rm sub2/large6
656 $ hg revert sub2/large6
657 $ hg revert sub2/large6
657 $ hg rm sub2/large6
658 $ hg rm sub2/large6
658 $ echo new >> sub2/large8
659 $ echo new >> sub2/large8
659 $ hg add --large sub2/large8
660 $ hg add --large sub2/large8
660 # XXX we don't really want to report that we're reverting the standin;
661 # XXX we don't really want to report that we're reverting the standin;
661 # that's just an implementation detail. But I don't see an obvious fix. ;-(
662 # that's just an implementation detail. But I don't see an obvious fix. ;-(
662 $ hg revert sub
663 $ hg revert sub
663 reverting .hglf/sub/large4 (glob)
664 reverting .hglf/sub/large4 (glob)
664 reverting sub/normal4 (glob)
665 reverting sub/normal4 (glob)
665 $ hg status
666 $ hg status
666 M normal3
667 M normal3
667 A sub2/large8
668 A sub2/large8
668 R sub2/large6
669 R sub2/large6
669 ? sub/large4.orig
670 ? sub/large4.orig
670 ? sub/normal4.orig
671 ? sub/normal4.orig
671 $ cat sub/normal4
672 $ cat sub/normal4
672 normal4-modified
673 normal4-modified
673 $ cat sub/large4
674 $ cat sub/large4
674 large4-modified
675 large4-modified
675 $ hg revert -a --no-backup
676 $ hg revert -a --no-backup
676 undeleting .hglf/sub2/large6 (glob)
677 undeleting .hglf/sub2/large6 (glob)
677 forgetting .hglf/sub2/large8 (glob)
678 forgetting .hglf/sub2/large8 (glob)
678 reverting normal3
679 reverting normal3
679 $ hg status
680 $ hg status
680 ? sub/large4.orig
681 ? sub/large4.orig
681 ? sub/normal4.orig
682 ? sub/normal4.orig
682 ? sub2/large8
683 ? sub2/large8
683 $ cat normal3
684 $ cat normal3
684 normal3-modified
685 normal3-modified
685 $ cat sub2/large6
686 $ cat sub2/large6
686 large6-modified
687 large6-modified
687 $ rm sub/*.orig sub2/large8
688 $ rm sub/*.orig sub2/large8
688
689
689 revert some files to an older revision
690 revert some files to an older revision
690 $ hg revert --no-backup -r 8 sub2
691 $ hg revert --no-backup -r 8 sub2
691 reverting .hglf/sub2/large6 (glob)
692 reverting .hglf/sub2/large6 (glob)
692 $ cat sub2/large6
693 $ cat sub2/large6
693 large6
694 large6
694 $ hg revert --no-backup sub2
695 $ hg revert --no-backup sub2
695 reverting .hglf/sub2/large6 (glob)
696 reverting .hglf/sub2/large6 (glob)
696 $ hg status
697 $ hg status
697
698
698 "verify --large" actually verifies largefiles
699 "verify --large" actually verifies largefiles
699
700
700 $ hg verify --large
701 $ hg verify --large
701 checking changesets
702 checking changesets
702 checking manifests
703 checking manifests
703 crosschecking files in changesets and manifests
704 crosschecking files in changesets and manifests
704 checking files
705 checking files
705 10 files, 10 changesets, 28 total revisions
706 10 files, 10 changesets, 28 total revisions
706 searching 1 changesets for largefiles
707 searching 1 changesets for largefiles
707 verified existence of 3 revisions of 3 largefiles
708 verified existence of 3 revisions of 3 largefiles
708
709
709 Merging does not revert to old versions of largefiles and also check
710 Merging does not revert to old versions of largefiles and also check
710 that merging after having pulled from a non-default remote works
711 that merging after having pulled from a non-default remote works
711 correctly.
712 correctly.
712
713
713 $ cd ..
714 $ cd ..
714 $ hg clone -r 7 e temp
715 $ hg clone -r 7 e temp
715 adding changesets
716 adding changesets
716 adding manifests
717 adding manifests
717 adding file changes
718 adding file changes
718 added 8 changesets with 24 changes to 10 files
719 added 8 changesets with 24 changes to 10 files
719 updating to branch default
720 updating to branch default
720 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
721 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
721 getting changed largefiles
722 getting changed largefiles
722 3 largefiles updated, 0 removed
723 3 largefiles updated, 0 removed
723 $ hg clone temp f
724 $ hg clone temp f
724 updating to branch default
725 updating to branch default
725 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
726 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
726 getting changed largefiles
727 getting changed largefiles
727 3 largefiles updated, 0 removed
728 3 largefiles updated, 0 removed
728 # Delete the largefiles in the largefiles system cache so that we have an
729 # Delete the largefiles in the largefiles system cache so that we have an
729 # opportunity to test that caching after a pull works.
730 # opportunity to test that caching after a pull works.
730 $ rm ${USERCACHE}/*
731 $ rm "${USERCACHE}"/*
731 $ cd f
732 $ cd f
732 $ echo "large4-merge-test" > sub/large4
733 $ echo "large4-merge-test" > sub/large4
733 $ hg commit -m "Modify large4 to test merge"
734 $ hg commit -m "Modify large4 to test merge"
734 Invoking status precommit hook
735 Invoking status precommit hook
735 M sub/large4
736 M sub/large4
736 $ hg pull ../e
737 $ hg pull ../e
737 pulling from ../e
738 pulling from ../e
738 searching for changes
739 searching for changes
739 adding changesets
740 adding changesets
740 adding manifests
741 adding manifests
741 adding file changes
742 adding file changes
742 added 2 changesets with 4 changes to 4 files (+1 heads)
743 added 2 changesets with 4 changes to 4 files (+1 heads)
743 (run 'hg heads' to see heads, 'hg merge' to merge)
744 (run 'hg heads' to see heads, 'hg merge' to merge)
744 caching new largefiles
745 caching new largefiles
745 2 largefiles cached
746 2 largefiles cached
746 $ hg merge
747 $ hg merge
747 merging sub/large4
748 merging sub/large4
748 largefile sub/large4 has a merge conflict
749 largefile sub/large4 has a merge conflict
749 keep (l)ocal or take (o)ther? l
750 keep (l)ocal or take (o)ther? l
750 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
751 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
751 (branch merge, don't forget to commit)
752 (branch merge, don't forget to commit)
752 getting changed largefiles
753 getting changed largefiles
753 1 largefiles updated, 0 removed
754 1 largefiles updated, 0 removed
754 $ hg commit -m "Merge repos e and f"
755 $ hg commit -m "Merge repos e and f"
755 Invoking status precommit hook
756 Invoking status precommit hook
756 M normal3
757 M normal3
757 M sub/normal4
758 M sub/normal4
758 M sub2/large6
759 M sub2/large6
759 $ cat normal3
760 $ cat normal3
760 normal3-modified
761 normal3-modified
761 $ cat sub/normal4
762 $ cat sub/normal4
762 normal4-modified
763 normal4-modified
763 $ cat sub/large4
764 $ cat sub/large4
764 large4-merge-test
765 large4-merge-test
765 $ cat sub2/large6
766 $ cat sub2/large6
766 large6-modified
767 large6-modified
767 $ cat sub2/large7
768 $ cat sub2/large7
768 large7
769 large7
769
770
770 Test status after merging with a branch that introduces a new largefile:
771 Test status after merging with a branch that introduces a new largefile:
771
772
772 $ echo large > large
773 $ echo large > large
773 $ hg add --large large
774 $ hg add --large large
774 $ hg commit -m 'add largefile'
775 $ hg commit -m 'add largefile'
775 Invoking status precommit hook
776 Invoking status precommit hook
776 A large
777 A large
777 $ hg update -q ".^"
778 $ hg update -q ".^"
778 $ echo change >> normal3
779 $ echo change >> normal3
779 $ hg commit -m 'some change'
780 $ hg commit -m 'some change'
780 Invoking status precommit hook
781 Invoking status precommit hook
781 M normal3
782 M normal3
782 created new head
783 created new head
783 $ hg merge
784 $ hg merge
784 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
785 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
785 (branch merge, don't forget to commit)
786 (branch merge, don't forget to commit)
786 getting changed largefiles
787 getting changed largefiles
787 1 largefiles updated, 0 removed
788 1 largefiles updated, 0 removed
788 $ hg status
789 $ hg status
789 M large
790 M large
790
791
791 Test that a normal file and a largefile with the same name and path cannot
792 Test that a normal file and a largefile with the same name and path cannot
792 coexist.
793 coexist.
793
794
794 $ rm sub2/large7
795 $ rm sub2/large7
795 $ echo "largeasnormal" > sub2/large7
796 $ echo "largeasnormal" > sub2/large7
796 $ hg add sub2/large7
797 $ hg add sub2/large7
797 sub2/large7 already a largefile
798 sub2/large7 already a largefile
798
799
799 Test that transplanting a largefile change works correctly.
800 Test that transplanting a largefile change works correctly.
800
801
801 $ cd ..
802 $ cd ..
802 $ hg clone -r 8 d g
803 $ hg clone -r 8 d g
803 adding changesets
804 adding changesets
804 adding manifests
805 adding manifests
805 adding file changes
806 adding file changes
806 added 9 changesets with 26 changes to 10 files
807 added 9 changesets with 26 changes to 10 files
807 updating to branch default
808 updating to branch default
808 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
809 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
809 getting changed largefiles
810 getting changed largefiles
810 3 largefiles updated, 0 removed
811 3 largefiles updated, 0 removed
811 $ cd g
812 $ cd g
812 $ hg transplant -s ../d 598410d3eb9a
813 $ hg transplant -s ../d 598410d3eb9a
813 searching for changes
814 searching for changes
814 searching for changes
815 searching for changes
815 adding changesets
816 adding changesets
816 adding manifests
817 adding manifests
817 adding file changes
818 adding file changes
818 added 1 changesets with 2 changes to 2 files
819 added 1 changesets with 2 changes to 2 files
819 getting changed largefiles
820 getting changed largefiles
820 1 largefiles updated, 0 removed
821 1 largefiles updated, 0 removed
821 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
822 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
822 9:598410d3eb9a modify normal file largefile in repo d
823 9:598410d3eb9a modify normal file largefile in repo d
823 8:a381d2c8c80e modify normal file and largefile in repo b
824 8:a381d2c8c80e modify normal file and largefile in repo b
824 7:daea875e9014 add/edit more largefiles
825 7:daea875e9014 add/edit more largefiles
825 6:4355d653f84f edit files yet again
826 6:4355d653f84f edit files yet again
826 5:9d5af5072dbd edit files again
827 5:9d5af5072dbd edit files again
827 4:74c02385b94c move files
828 4:74c02385b94c move files
828 3:9e8fbc4bce62 copy files
829 3:9e8fbc4bce62 copy files
829 2:51a0ae4d5864 remove files
830 2:51a0ae4d5864 remove files
830 1:ce8896473775 edit files
831 1:ce8896473775 edit files
831 0:30d30fe6a5be add files
832 0:30d30fe6a5be add files
832 $ cat normal3
833 $ cat normal3
833 normal3-modified
834 normal3-modified
834 $ cat sub/normal4
835 $ cat sub/normal4
835 normal4-modified
836 normal4-modified
836 $ cat sub/large4
837 $ cat sub/large4
837 large4-modified
838 large4-modified
838 $ cat sub2/large6
839 $ cat sub2/large6
839 large6-modified
840 large6-modified
840 $ cat sub2/large7
841 $ cat sub2/large7
841 large7
842 large7
842
843
843 Cat a largefile
844 Cat a largefile
844 $ hg cat normal3
845 $ hg cat normal3
845 normal3-modified
846 normal3-modified
846 $ hg cat sub/large4
847 $ hg cat sub/large4
847 large4-modified
848 large4-modified
848 $ rm ${USERCACHE}/*
849 $ rm "${USERCACHE}"/*
849 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
850 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
850 $ cat cat.out
851 $ cat cat.out
851 large4-modified
852 large4-modified
852 $ rm cat.out
853 $ rm cat.out
853 $ hg cat -r a381d2c8c80e normal3
854 $ hg cat -r a381d2c8c80e normal3
854 normal3-modified
855 normal3-modified
855
856
856 Test that renaming a largefile results in correct output for status
857 Test that renaming a largefile results in correct output for status
857
858
858 $ hg rename sub/large4 large4-renamed
859 $ hg rename sub/large4 large4-renamed
859 $ hg commit -m "test rename output"
860 $ hg commit -m "test rename output"
860 Invoking status precommit hook
861 Invoking status precommit hook
861 A large4-renamed
862 A large4-renamed
862 R sub/large4
863 R sub/large4
863 $ cat large4-renamed
864 $ cat large4-renamed
864 large4-modified
865 large4-modified
865 $ cd sub2
866 $ cd sub2
866 $ hg rename large6 large6-renamed
867 $ hg rename large6 large6-renamed
867 $ hg st
868 $ hg st
868 A sub2/large6-renamed
869 A sub2/large6-renamed
869 R sub2/large6
870 R sub2/large6
870 $ cd ..
871 $ cd ..
871
872
872 Test --normal flag
873 Test --normal flag
873
874
874 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
875 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
875 $ hg add --normal --large new-largefile
876 $ hg add --normal --large new-largefile
876 abort: --normal cannot be used with --large
877 abort: --normal cannot be used with --large
877 [255]
878 [255]
878 $ hg add --normal new-largefile
879 $ hg add --normal new-largefile
879 new-largefile: up to 69 MB of RAM may be required to manage this file
880 new-largefile: up to 69 MB of RAM may be required to manage this file
880 (use 'hg revert new-largefile' to cancel the pending addition)
881 (use 'hg revert new-largefile' to cancel the pending addition)
881 $ cd ..
882 $ cd ..
882
883
884 #if serve
883 vanilla clients not locked out from largefiles servers on vanilla repos
885 vanilla clients not locked out from largefiles servers on vanilla repos
884 $ mkdir r1
886 $ mkdir r1
885 $ cd r1
887 $ cd r1
886 $ hg init
888 $ hg init
887 $ echo c1 > f1
889 $ echo c1 > f1
888 $ hg add f1
890 $ hg add f1
889 $ hg commit -m "m1"
891 $ hg commit -m "m1"
890 Invoking status precommit hook
892 Invoking status precommit hook
891 A f1
893 A f1
892 $ cd ..
894 $ cd ..
893 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
895 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
894 $ cat hg.pid >> $DAEMON_PIDS
896 $ cat hg.pid >> $DAEMON_PIDS
895 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
897 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
896 requesting all changes
898 requesting all changes
897 adding changesets
899 adding changesets
898 adding manifests
900 adding manifests
899 adding file changes
901 adding file changes
900 added 1 changesets with 1 changes to 1 files
902 added 1 changesets with 1 changes to 1 files
901 updating to branch default
903 updating to branch default
902 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
904 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
903
905
904 largefiles clients still work with vanilla servers
906 largefiles clients still work with vanilla servers
905 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
907 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
906 $ cat hg.pid >> $DAEMON_PIDS
908 $ cat hg.pid >> $DAEMON_PIDS
907 $ hg clone http://localhost:$HGPORT1 r3
909 $ hg clone http://localhost:$HGPORT1 r3
908 requesting all changes
910 requesting all changes
909 adding changesets
911 adding changesets
910 adding manifests
912 adding manifests
911 adding file changes
913 adding file changes
912 added 1 changesets with 1 changes to 1 files
914 added 1 changesets with 1 changes to 1 files
913 updating to branch default
915 updating to branch default
914 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
916 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
917 #endif
918
915
919
916 vanilla clients locked out from largefiles http repos
920 vanilla clients locked out from largefiles http repos
917 $ mkdir r4
921 $ mkdir r4
918 $ cd r4
922 $ cd r4
919 $ hg init
923 $ hg init
920 $ echo c1 > f1
924 $ echo c1 > f1
921 $ hg add --large f1
925 $ hg add --large f1
922 $ hg commit -m "m1"
926 $ hg commit -m "m1"
923 Invoking status precommit hook
927 Invoking status precommit hook
924 A f1
928 A f1
925 $ cd ..
929 $ cd ..
930
931 #if serve
926 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
932 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
927 $ cat hg.pid >> $DAEMON_PIDS
933 $ cat hg.pid >> $DAEMON_PIDS
928 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
934 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
929 abort: remote error:
935 abort: remote error:
930
936
931 This repository uses the largefiles extension.
937 This repository uses the largefiles extension.
932
938
933 Please enable it in your Mercurial config file.
939 Please enable it in your Mercurial config file.
934 [255]
940 [255]
935
941
936 used all HGPORTs, kill all daemons
942 used all HGPORTs, kill all daemons
937 $ "$TESTDIR/killdaemons.py"
943 $ "$TESTDIR/killdaemons.py"
944 #endif
938
945
939 vanilla clients locked out from largefiles ssh repos
946 vanilla clients locked out from largefiles ssh repos
940 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
947 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
941 abort: remote error:
948 abort: remote error:
942
949
943 This repository uses the largefiles extension.
950 This repository uses the largefiles extension.
944
951
945 Please enable it in your Mercurial config file.
952 Please enable it in your Mercurial config file.
946 [255]
953 [255]
947
954
955 #if serve
956
948 largefiles clients refuse to push largefiles repos to vanilla servers
957 largefiles clients refuse to push largefiles repos to vanilla servers
949 $ mkdir r6
958 $ mkdir r6
950 $ cd r6
959 $ cd r6
951 $ hg init
960 $ hg init
952 $ echo c1 > f1
961 $ echo c1 > f1
953 $ hg add f1
962 $ hg add f1
954 $ hg commit -m "m1"
963 $ hg commit -m "m1"
955 Invoking status precommit hook
964 Invoking status precommit hook
956 A f1
965 A f1
957 $ cat >> .hg/hgrc <<!
966 $ cat >> .hg/hgrc <<!
958 > [web]
967 > [web]
959 > push_ssl = false
968 > push_ssl = false
960 > allow_push = *
969 > allow_push = *
961 > !
970 > !
962 $ cd ..
971 $ cd ..
963 $ hg clone r6 r7
972 $ hg clone r6 r7
964 updating to branch default
973 updating to branch default
965 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
974 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
966 $ cd r7
975 $ cd r7
967 $ echo c2 > f2
976 $ echo c2 > f2
968 $ hg add --large f2
977 $ hg add --large f2
969 $ hg commit -m "m2"
978 $ hg commit -m "m2"
970 Invoking status precommit hook
979 Invoking status precommit hook
971 A f2
980 A f2
972 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
981 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
973 $ cat ../hg.pid >> $DAEMON_PIDS
982 $ cat ../hg.pid >> $DAEMON_PIDS
974 $ hg push http://localhost:$HGPORT
983 $ hg push http://localhost:$HGPORT
975 pushing to http://localhost:$HGPORT/
984 pushing to http://localhost:$HGPORT/
976 searching for changes
985 searching for changes
977 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
986 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
978 [255]
987 [255]
979 $ cd ..
988 $ cd ..
980
989
981 putlfile errors are shown (issue3123)
990 putlfile errors are shown (issue3123)
982 Corrupt the cached largefile in r7
991 Corrupt the cached largefile in r7
983 $ echo corruption > $USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8
992 $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
984 $ hg init empty
993 $ hg init empty
985 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
994 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
986 > --config 'web.allow_push=*' --config web.push_ssl=False
995 > --config 'web.allow_push=*' --config web.push_ssl=False
987 $ cat hg.pid >> $DAEMON_PIDS
996 $ cat hg.pid >> $DAEMON_PIDS
988 $ hg push -R r7 http://localhost:$HGPORT1
997 $ hg push -R r7 http://localhost:$HGPORT1
989 pushing to http://localhost:$HGPORT1/
998 pushing to http://localhost:$HGPORT1/
990 searching for changes
999 searching for changes
991 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
1000 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
992 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
1001 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
993 [255]
1002 [255]
994 $ rm -rf empty
1003 $ rm -rf empty
995
1004
996 Push a largefiles repository to a served empty repository
1005 Push a largefiles repository to a served empty repository
997 $ hg init r8
1006 $ hg init r8
998 $ echo c3 > r8/f1
1007 $ echo c3 > r8/f1
999 $ hg add --large r8/f1 -R r8
1008 $ hg add --large r8/f1 -R r8
1000 $ hg commit -m "m1" -R r8
1009 $ hg commit -m "m1" -R r8
1001 Invoking status precommit hook
1010 Invoking status precommit hook
1002 A f1
1011 A f1
1003 $ hg init empty
1012 $ hg init empty
1004 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1013 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1005 > --config 'web.allow_push=*' --config web.push_ssl=False
1014 > --config 'web.allow_push=*' --config web.push_ssl=False
1006 $ cat hg.pid >> $DAEMON_PIDS
1015 $ cat hg.pid >> $DAEMON_PIDS
1007 $ rm ${USERCACHE}/*
1016 $ rm "${USERCACHE}"/*
1008 $ hg push -R r8 http://localhost:$HGPORT2
1017 $ hg push -R r8 http://localhost:$HGPORT2
1009 pushing to http://localhost:$HGPORT2/
1018 pushing to http://localhost:$HGPORT2/
1010 searching for changes
1019 searching for changes
1011 searching for changes
1020 searching for changes
1012 remote: adding changesets
1021 remote: adding changesets
1013 remote: adding manifests
1022 remote: adding manifests
1014 remote: adding file changes
1023 remote: adding file changes
1015 remote: added 1 changesets with 1 changes to 1 files
1024 remote: added 1 changesets with 1 changes to 1 files
1016 $ rm -rf empty
1025 $ rm -rf empty
1017
1026
1018 used all HGPORTs, kill all daemons
1027 used all HGPORTs, kill all daemons
1019 $ "$TESTDIR/killdaemons.py"
1028 $ "$TESTDIR/killdaemons.py"
1020
1029
1030 #endif
1031
1032
1021 #if unix-permissions
1033 #if unix-permissions
1022
1034
1023 Clone a local repository owned by another user
1035 Clone a local repository owned by another user
1024 We have to simulate that here by setting $HOME and removing write permissions
1036 We have to simulate that here by setting $HOME and removing write permissions
1025 $ ORIGHOME="$HOME"
1037 $ ORIGHOME="$HOME"
1026 $ mkdir alice
1038 $ mkdir alice
1027 $ HOME="`pwd`/alice"
1039 $ HOME="`pwd`/alice"
1028 $ cd alice
1040 $ cd alice
1029 $ hg init pubrepo
1041 $ hg init pubrepo
1030 $ cd pubrepo
1042 $ cd pubrepo
1031 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1043 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1032 $ hg add --large a-large-file
1044 $ hg add --large a-large-file
1033 $ hg commit -m "Add a large file"
1045 $ hg commit -m "Add a large file"
1034 Invoking status precommit hook
1046 Invoking status precommit hook
1035 A a-large-file
1047 A a-large-file
1036 $ cd ..
1048 $ cd ..
1037 $ chmod -R a-w pubrepo
1049 $ chmod -R a-w pubrepo
1038 $ cd ..
1050 $ cd ..
1039 $ mkdir bob
1051 $ mkdir bob
1040 $ HOME="`pwd`/bob"
1052 $ HOME="`pwd`/bob"
1041 $ cd bob
1053 $ cd bob
1042 $ hg clone --pull ../alice/pubrepo pubrepo
1054 $ hg clone --pull ../alice/pubrepo pubrepo
1043 requesting all changes
1055 requesting all changes
1044 adding changesets
1056 adding changesets
1045 adding manifests
1057 adding manifests
1046 adding file changes
1058 adding file changes
1047 added 1 changesets with 1 changes to 1 files
1059 added 1 changesets with 1 changes to 1 files
1048 updating to branch default
1060 updating to branch default
1049 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1061 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1050 getting changed largefiles
1062 getting changed largefiles
1051 1 largefiles updated, 0 removed
1063 1 largefiles updated, 0 removed
1052 $ cd ..
1064 $ cd ..
1053 $ chmod -R u+w alice/pubrepo
1065 $ chmod -R u+w alice/pubrepo
1054 $ HOME="$ORIGHOME"
1066 $ HOME="$ORIGHOME"
1055
1067
1056 #endif
1068 #endif
1057
1069
1058 #if symlink
1070 #if symlink
1059
1071
1060 Symlink to a large largefile should behave the same as a symlink to a normal file
1072 Symlink to a large largefile should behave the same as a symlink to a normal file
1061 $ hg init largesymlink
1073 $ hg init largesymlink
1062 $ cd largesymlink
1074 $ cd largesymlink
1063 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1075 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1064 $ hg add --large largefile
1076 $ hg add --large largefile
1065 $ hg commit -m "commit a large file"
1077 $ hg commit -m "commit a large file"
1066 Invoking status precommit hook
1078 Invoking status precommit hook
1067 A largefile
1079 A largefile
1068 $ ln -s largefile largelink
1080 $ ln -s largefile largelink
1069 $ hg add largelink
1081 $ hg add largelink
1070 $ hg commit -m "commit a large symlink"
1082 $ hg commit -m "commit a large symlink"
1071 Invoking status precommit hook
1083 Invoking status precommit hook
1072 A largelink
1084 A largelink
1073 $ rm -f largelink
1085 $ rm -f largelink
1074 $ hg up >/dev/null
1086 $ hg up >/dev/null
1075 $ test -f largelink
1087 $ test -f largelink
1076 [1]
1088 [1]
1077 $ test -L largelink
1089 $ test -L largelink
1078 [1]
1090 [1]
1079 $ rm -f largelink # make next part of the test independent of the previous
1091 $ rm -f largelink # make next part of the test independent of the previous
1080 $ hg up -C >/dev/null
1092 $ hg up -C >/dev/null
1081 $ test -f largelink
1093 $ test -f largelink
1082 $ test -L largelink
1094 $ test -L largelink
1083 $ cd ..
1095 $ cd ..
1084
1096
1085 #endif
1097 #endif
1086
1098
1087 test for pattern matching on 'hg status':
1099 test for pattern matching on 'hg status':
1088 to boost performance, largefiles checks whether specified patterns are
1100 to boost performance, largefiles checks whether specified patterns are
1089 related to largefiles in working directory (NOT to STANDIN) or not.
1101 related to largefiles in working directory (NOT to STANDIN) or not.
1090
1102
1091 $ hg init statusmatch
1103 $ hg init statusmatch
1092 $ cd statusmatch
1104 $ cd statusmatch
1093
1105
1094 $ mkdir -p a/b/c/d
1106 $ mkdir -p a/b/c/d
1095 $ echo normal > a/b/c/d/e.normal.txt
1107 $ echo normal > a/b/c/d/e.normal.txt
1096 $ hg add a/b/c/d/e.normal.txt
1108 $ hg add a/b/c/d/e.normal.txt
1097 $ echo large > a/b/c/d/e.large.txt
1109 $ echo large > a/b/c/d/e.large.txt
1098 $ hg add --large a/b/c/d/e.large.txt
1110 $ hg add --large a/b/c/d/e.large.txt
1099 $ mkdir -p a/b/c/x
1111 $ mkdir -p a/b/c/x
1100 $ echo normal > a/b/c/x/y.normal.txt
1112 $ echo normal > a/b/c/x/y.normal.txt
1101 $ hg add a/b/c/x/y.normal.txt
1113 $ hg add a/b/c/x/y.normal.txt
1102 $ hg commit -m 'add files'
1114 $ hg commit -m 'add files'
1103 Invoking status precommit hook
1115 Invoking status precommit hook
1104 A a/b/c/d/e.large.txt
1116 A a/b/c/d/e.large.txt
1105 A a/b/c/d/e.normal.txt
1117 A a/b/c/d/e.normal.txt
1106 A a/b/c/x/y.normal.txt
1118 A a/b/c/x/y.normal.txt
1107
1119
1108 (1) no pattern: no performance boost
1120 (1) no pattern: no performance boost
1109 $ hg status -A
1121 $ hg status -A
1110 C a/b/c/d/e.large.txt
1122 C a/b/c/d/e.large.txt
1111 C a/b/c/d/e.normal.txt
1123 C a/b/c/d/e.normal.txt
1112 C a/b/c/x/y.normal.txt
1124 C a/b/c/x/y.normal.txt
1113
1125
1114 (2) pattern not related to largefiles: performance boost
1126 (2) pattern not related to largefiles: performance boost
1115 $ hg status -A a/b/c/x
1127 $ hg status -A a/b/c/x
1116 C a/b/c/x/y.normal.txt
1128 C a/b/c/x/y.normal.txt
1117
1129
1118 (3) pattern related to largefiles: no performance boost
1130 (3) pattern related to largefiles: no performance boost
1119 $ hg status -A a/b/c/d
1131 $ hg status -A a/b/c/d
1120 C a/b/c/d/e.large.txt
1132 C a/b/c/d/e.large.txt
1121 C a/b/c/d/e.normal.txt
1133 C a/b/c/d/e.normal.txt
1122
1134
1123 (4) pattern related to STANDIN (not to largefiles): performance boost
1135 (4) pattern related to STANDIN (not to largefiles): performance boost
1124 $ hg status -A .hglf/a
1136 $ hg status -A .hglf/a
1125 C .hglf/a/b/c/d/e.large.txt
1137 C .hglf/a/b/c/d/e.large.txt
1126
1138
1127 (5) mixed case: no performance boost
1139 (5) mixed case: no performance boost
1128 $ hg status -A a/b/c/x a/b/c/d
1140 $ hg status -A a/b/c/x a/b/c/d
1129 C a/b/c/d/e.large.txt
1141 C a/b/c/d/e.large.txt
1130 C a/b/c/d/e.normal.txt
1142 C a/b/c/d/e.normal.txt
1131 C a/b/c/x/y.normal.txt
1143 C a/b/c/x/y.normal.txt
1132
1144
1133 verify that largefiles doesn't break filesets
1145 verify that largefiles doesn't break filesets
1134
1146
1135 $ hg log --rev . --exclude "set:binary()"
1147 $ hg log --rev . --exclude "set:binary()"
1136 changeset: 0:41bd42f10efa
1148 changeset: 0:41bd42f10efa
1137 tag: tip
1149 tag: tip
1138 user: test
1150 user: test
1139 date: Thu Jan 01 00:00:00 1970 +0000
1151 date: Thu Jan 01 00:00:00 1970 +0000
1140 summary: add files
1152 summary: add files
1141
1153
1142 verify that large files in subrepos handled properly
1154 verify that large files in subrepos handled properly
1143 $ hg init subrepo
1155 $ hg init subrepo
1144 $ echo "subrepo = subrepo" > .hgsub
1156 $ echo "subrepo = subrepo" > .hgsub
1145 $ hg add .hgsub
1157 $ hg add .hgsub
1146 $ hg ci -m "add subrepo"
1158 $ hg ci -m "add subrepo"
1147 Invoking status precommit hook
1159 Invoking status precommit hook
1148 A .hgsub
1160 A .hgsub
1149 ? .hgsubstate
1161 ? .hgsubstate
1150 $ echo "rev 1" > subrepo/large.txt
1162 $ echo "rev 1" > subrepo/large.txt
1151 $ hg -R subrepo add --large subrepo/large.txt
1163 $ hg -R subrepo add --large subrepo/large.txt
1152 $ hg sum
1164 $ hg sum
1153 parent: 1:8ee150ea2e9c tip
1165 parent: 1:8ee150ea2e9c tip
1154 add subrepo
1166 add subrepo
1155 branch: default
1167 branch: default
1156 commit: 1 subrepos
1168 commit: 1 subrepos
1157 update: (current)
1169 update: (current)
1158 $ hg st
1170 $ hg st
1159 $ hg st -S
1171 $ hg st -S
1160 A subrepo/large.txt
1172 A subrepo/large.txt
1161 $ hg ci -S -m "commit top repo"
1173 $ hg ci -S -m "commit top repo"
1162 committing subrepository subrepo
1174 committing subrepository subrepo
1163 Invoking status precommit hook
1175 Invoking status precommit hook
1164 A large.txt
1176 A large.txt
1165 Invoking status precommit hook
1177 Invoking status precommit hook
1166 M .hgsubstate
1178 M .hgsubstate
1167 # No differences
1179 # No differences
1168 $ hg st -S
1180 $ hg st -S
1169 $ hg sum
1181 $ hg sum
1170 parent: 2:ce4cd0c527a6 tip
1182 parent: 2:ce4cd0c527a6 tip
1171 commit top repo
1183 commit top repo
1172 branch: default
1184 branch: default
1173 commit: (clean)
1185 commit: (clean)
1174 update: (current)
1186 update: (current)
1175 $ echo "rev 2" > subrepo/large.txt
1187 $ echo "rev 2" > subrepo/large.txt
1176 $ hg st -S
1188 $ hg st -S
1177 M subrepo/large.txt
1189 M subrepo/large.txt
1178 $ hg sum
1190 $ hg sum
1179 parent: 2:ce4cd0c527a6 tip
1191 parent: 2:ce4cd0c527a6 tip
1180 commit top repo
1192 commit top repo
1181 branch: default
1193 branch: default
1182 commit: 1 subrepos
1194 commit: 1 subrepos
1183 update: (current)
1195 update: (current)
1184 $ hg ci -m "this commit should fail without -S"
1196 $ hg ci -m "this commit should fail without -S"
1185 abort: uncommitted changes in subrepo subrepo
1197 abort: uncommitted changes in subrepo subrepo
1186 (use --subrepos for recursive commit)
1198 (use --subrepos for recursive commit)
1187 [255]
1199 [255]
1188
1200
1189 Add a normal file to the subrepo, then test archiving
1201 Add a normal file to the subrepo, then test archiving
1190
1202
1191 $ echo 'normal file' > subrepo/normal.txt
1203 $ echo 'normal file' > subrepo/normal.txt
1192 $ hg -R subrepo add subrepo/normal.txt
1204 $ hg -R subrepo add subrepo/normal.txt
1193
1205
1194 Lock in subrepo, otherwise the change isn't archived
1206 Lock in subrepo, otherwise the change isn't archived
1195
1207
1196 $ hg ci -S -m "add normal file to top level"
1208 $ hg ci -S -m "add normal file to top level"
1197 committing subrepository subrepo
1209 committing subrepository subrepo
1198 Invoking status precommit hook
1210 Invoking status precommit hook
1199 M large.txt
1211 M large.txt
1200 A normal.txt
1212 A normal.txt
1201 Invoking status precommit hook
1213 Invoking status precommit hook
1202 M .hgsubstate
1214 M .hgsubstate
1203 $ hg archive -S lf_subrepo_archive
1215 $ hg archive -S lf_subrepo_archive
1204 $ find lf_subrepo_archive | sort
1216 $ find lf_subrepo_archive | sort
1205 lf_subrepo_archive
1217 lf_subrepo_archive
1206 lf_subrepo_archive/.hg_archival.txt
1218 lf_subrepo_archive/.hg_archival.txt
1207 lf_subrepo_archive/.hgsub
1219 lf_subrepo_archive/.hgsub
1208 lf_subrepo_archive/.hgsubstate
1220 lf_subrepo_archive/.hgsubstate
1209 lf_subrepo_archive/a
1221 lf_subrepo_archive/a
1210 lf_subrepo_archive/a/b
1222 lf_subrepo_archive/a/b
1211 lf_subrepo_archive/a/b/c
1223 lf_subrepo_archive/a/b/c
1212 lf_subrepo_archive/a/b/c/d
1224 lf_subrepo_archive/a/b/c/d
1213 lf_subrepo_archive/a/b/c/d/e.large.txt
1225 lf_subrepo_archive/a/b/c/d/e.large.txt
1214 lf_subrepo_archive/a/b/c/d/e.normal.txt
1226 lf_subrepo_archive/a/b/c/d/e.normal.txt
1215 lf_subrepo_archive/a/b/c/x
1227 lf_subrepo_archive/a/b/c/x
1216 lf_subrepo_archive/a/b/c/x/y.normal.txt
1228 lf_subrepo_archive/a/b/c/x/y.normal.txt
1217 lf_subrepo_archive/subrepo
1229 lf_subrepo_archive/subrepo
1218 lf_subrepo_archive/subrepo/large.txt
1230 lf_subrepo_archive/subrepo/large.txt
1219 lf_subrepo_archive/subrepo/normal.txt
1231 lf_subrepo_archive/subrepo/normal.txt
1220
1232
1221 $ cd ..
1233 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now