##// END OF EJS Templates
test-largefiles.t: fix wrong '#if hgweb' - it should be '#if serve'...
Mads Kiilerich -
r18228:1528ff6a default
parent child Browse files
Show More
@@ -1,1834 +1,1834
1 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
1 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
2 $ mkdir "${USERCACHE}"
2 $ mkdir "${USERCACHE}"
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
4 > [extensions]
5 > largefiles=
5 > largefiles=
6 > purge=
6 > purge=
7 > rebase=
7 > rebase=
8 > transplant=
8 > transplant=
9 > [phases]
9 > [phases]
10 > publish=False
10 > publish=False
11 > [largefiles]
11 > [largefiles]
12 > minsize=2
12 > minsize=2
13 > patterns=glob:**.dat
13 > patterns=glob:**.dat
14 > usercache=${USERCACHE}
14 > usercache=${USERCACHE}
15 > [hooks]
15 > [hooks]
16 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
16 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
17 > EOF
17 > EOF
18
18
19 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
20 files.
20 files.
21 Test status and dirstate of largefiles and that summary output is correct.
21 Test status and dirstate of largefiles and that summary output is correct.
22
22
23 $ hg init a
23 $ hg init a
24 $ cd a
24 $ cd a
25 $ mkdir sub
25 $ mkdir sub
26 $ echo normal1 > normal1
26 $ echo normal1 > normal1
27 $ echo normal2 > sub/normal2
27 $ echo normal2 > sub/normal2
28 $ echo large1 > large1
28 $ echo large1 > large1
29 $ echo large2 > sub/large2
29 $ echo large2 > sub/large2
30 $ hg add normal1 sub/normal2
30 $ hg add normal1 sub/normal2
31 $ hg add --large large1 sub/large2
31 $ hg add --large large1 sub/large2
32 $ hg commit -m "add files"
32 $ hg commit -m "add files"
33 Invoking status precommit hook
33 Invoking status precommit hook
34 A large1
34 A large1
35 A normal1
35 A normal1
36 A sub/large2
36 A sub/large2
37 A sub/normal2
37 A sub/normal2
38 $ touch large1 sub/large2
38 $ touch large1 sub/large2
39 $ sleep 1
39 $ sleep 1
40 $ hg st
40 $ hg st
41 $ hg debugstate --nodates
41 $ hg debugstate --nodates
42 n 644 41 .hglf/large1
42 n 644 41 .hglf/large1
43 n 644 41 .hglf/sub/large2
43 n 644 41 .hglf/sub/large2
44 n 644 8 normal1
44 n 644 8 normal1
45 n 644 8 sub/normal2
45 n 644 8 sub/normal2
46 $ hg debugstate --large
46 $ hg debugstate --large
47 n 644 7 large1
47 n 644 7 large1
48 n 644 7 sub/large2
48 n 644 7 sub/large2
49 $ echo normal11 > normal1
49 $ echo normal11 > normal1
50 $ echo normal22 > sub/normal2
50 $ echo normal22 > sub/normal2
51 $ echo large11 > large1
51 $ echo large11 > large1
52 $ echo large22 > sub/large2
52 $ echo large22 > sub/large2
53 $ hg commit -m "edit files"
53 $ hg commit -m "edit files"
54 Invoking status precommit hook
54 Invoking status precommit hook
55 M large1
55 M large1
56 M normal1
56 M normal1
57 M sub/large2
57 M sub/large2
58 M sub/normal2
58 M sub/normal2
59 $ hg sum --large
59 $ hg sum --large
60 parent: 1:ce8896473775 tip
60 parent: 1:ce8896473775 tip
61 edit files
61 edit files
62 branch: default
62 branch: default
63 commit: (clean)
63 commit: (clean)
64 update: (current)
64 update: (current)
65 largefiles: (no remote repo)
65 largefiles: (no remote repo)
66
66
67 Commit preserved largefile contents.
67 Commit preserved largefile contents.
68
68
69 $ cat normal1
69 $ cat normal1
70 normal11
70 normal11
71 $ cat large1
71 $ cat large1
72 large11
72 large11
73 $ cat sub/normal2
73 $ cat sub/normal2
74 normal22
74 normal22
75 $ cat sub/large2
75 $ cat sub/large2
76 large22
76 large22
77
77
78 Test status, subdir and unknown files
78 Test status, subdir and unknown files
79
79
80 $ echo unknown > sub/unknown
80 $ echo unknown > sub/unknown
81 $ hg st --all
81 $ hg st --all
82 ? sub/unknown
82 ? sub/unknown
83 C large1
83 C large1
84 C normal1
84 C normal1
85 C sub/large2
85 C sub/large2
86 C sub/normal2
86 C sub/normal2
87 $ hg st --all sub
87 $ hg st --all sub
88 ? sub/unknown
88 ? sub/unknown
89 C sub/large2
89 C sub/large2
90 C sub/normal2
90 C sub/normal2
91 $ rm sub/unknown
91 $ rm sub/unknown
92
92
93 Test messages and exit codes for remove warning cases
93 Test messages and exit codes for remove warning cases
94
94
95 $ hg remove -A large1
95 $ hg remove -A large1
96 not removing large1: file still exists
96 not removing large1: file still exists
97 [1]
97 [1]
98 $ echo 'modified' > large1
98 $ echo 'modified' > large1
99 $ hg remove large1
99 $ hg remove large1
100 not removing large1: file is modified (use -f to force removal)
100 not removing large1: file is modified (use -f to force removal)
101 [1]
101 [1]
102 $ echo 'new' > normalnew
102 $ echo 'new' > normalnew
103 $ hg add normalnew
103 $ hg add normalnew
104 $ echo 'new' > largenew
104 $ echo 'new' > largenew
105 $ hg add --large normalnew
105 $ hg add --large normalnew
106 normalnew already tracked!
106 normalnew already tracked!
107 $ hg remove normalnew largenew
107 $ hg remove normalnew largenew
108 not removing largenew: file is untracked
108 not removing largenew: file is untracked
109 not removing normalnew: file has been marked for add (use forget to undo)
109 not removing normalnew: file has been marked for add (use forget to undo)
110 [1]
110 [1]
111 $ rm normalnew largenew
111 $ rm normalnew largenew
112 $ hg up -Cq
112 $ hg up -Cq
113
113
114 Remove both largefiles and normal files.
114 Remove both largefiles and normal files.
115
115
116 $ hg remove normal1 large1
116 $ hg remove normal1 large1
117 $ hg status large1
117 $ hg status large1
118 R large1
118 R large1
119 $ hg commit -m "remove files"
119 $ hg commit -m "remove files"
120 Invoking status precommit hook
120 Invoking status precommit hook
121 R large1
121 R large1
122 R normal1
122 R normal1
123 $ ls
123 $ ls
124 sub
124 sub
125 $ echo "testlargefile" > large1-test
125 $ echo "testlargefile" > large1-test
126 $ hg add --large large1-test
126 $ hg add --large large1-test
127 $ hg st
127 $ hg st
128 A large1-test
128 A large1-test
129 $ hg rm large1-test
129 $ hg rm large1-test
130 not removing large1-test: file has been marked for add (use forget to undo)
130 not removing large1-test: file has been marked for add (use forget to undo)
131 [1]
131 [1]
132 $ hg st
132 $ hg st
133 A large1-test
133 A large1-test
134 $ hg forget large1-test
134 $ hg forget large1-test
135 $ hg st
135 $ hg st
136 ? large1-test
136 ? large1-test
137 $ hg remove large1-test
137 $ hg remove large1-test
138 not removing large1-test: file is untracked
138 not removing large1-test: file is untracked
139 [1]
139 [1]
140 $ hg forget large1-test
140 $ hg forget large1-test
141 not removing large1-test: file is already untracked
141 not removing large1-test: file is already untracked
142 [1]
142 [1]
143 $ rm large1-test
143 $ rm large1-test
144
144
145 Copy both largefiles and normal files (testing that status output is correct).
145 Copy both largefiles and normal files (testing that status output is correct).
146
146
147 $ hg cp sub/normal2 normal1
147 $ hg cp sub/normal2 normal1
148 $ hg cp sub/large2 large1
148 $ hg cp sub/large2 large1
149 $ hg commit -m "copy files"
149 $ hg commit -m "copy files"
150 Invoking status precommit hook
150 Invoking status precommit hook
151 A large1
151 A large1
152 A normal1
152 A normal1
153 $ cat normal1
153 $ cat normal1
154 normal22
154 normal22
155 $ cat large1
155 $ cat large1
156 large22
156 large22
157
157
158 Test moving largefiles and verify that normal files are also unaffected.
158 Test moving largefiles and verify that normal files are also unaffected.
159
159
160 $ hg mv normal1 normal3
160 $ hg mv normal1 normal3
161 $ hg mv large1 large3
161 $ hg mv large1 large3
162 $ hg mv sub/normal2 sub/normal4
162 $ hg mv sub/normal2 sub/normal4
163 $ hg mv sub/large2 sub/large4
163 $ hg mv sub/large2 sub/large4
164 $ hg commit -m "move files"
164 $ hg commit -m "move files"
165 Invoking status precommit hook
165 Invoking status precommit hook
166 A large3
166 A large3
167 A normal3
167 A normal3
168 A sub/large4
168 A sub/large4
169 A sub/normal4
169 A sub/normal4
170 R large1
170 R large1
171 R normal1
171 R normal1
172 R sub/large2
172 R sub/large2
173 R sub/normal2
173 R sub/normal2
174 $ cat normal3
174 $ cat normal3
175 normal22
175 normal22
176 $ cat large3
176 $ cat large3
177 large22
177 large22
178 $ cat sub/normal4
178 $ cat sub/normal4
179 normal22
179 normal22
180 $ cat sub/large4
180 $ cat sub/large4
181 large22
181 large22
182
182
183 Test copies and moves from a directory other than root (issue3516)
183 Test copies and moves from a directory other than root (issue3516)
184
184
185 $ cd ..
185 $ cd ..
186 $ hg init lf_cpmv
186 $ hg init lf_cpmv
187 $ cd lf_cpmv
187 $ cd lf_cpmv
188 $ mkdir dira
188 $ mkdir dira
189 $ mkdir dira/dirb
189 $ mkdir dira/dirb
190 $ touch dira/dirb/largefile
190 $ touch dira/dirb/largefile
191 $ hg add --large dira/dirb/largefile
191 $ hg add --large dira/dirb/largefile
192 $ hg commit -m "added"
192 $ hg commit -m "added"
193 Invoking status precommit hook
193 Invoking status precommit hook
194 A dira/dirb/largefile
194 A dira/dirb/largefile
195 $ cd dira
195 $ cd dira
196 $ hg cp dirb/largefile foo/largefile
196 $ hg cp dirb/largefile foo/largefile
197 $ hg ci -m "deep copy"
197 $ hg ci -m "deep copy"
198 Invoking status precommit hook
198 Invoking status precommit hook
199 A dira/foo/largefile
199 A dira/foo/largefile
200 $ find . | sort
200 $ find . | sort
201 .
201 .
202 ./dirb
202 ./dirb
203 ./dirb/largefile
203 ./dirb/largefile
204 ./foo
204 ./foo
205 ./foo/largefile
205 ./foo/largefile
206 $ hg mv foo/largefile baz/largefile
206 $ hg mv foo/largefile baz/largefile
207 $ hg ci -m "moved"
207 $ hg ci -m "moved"
208 Invoking status precommit hook
208 Invoking status precommit hook
209 A dira/baz/largefile
209 A dira/baz/largefile
210 R dira/foo/largefile
210 R dira/foo/largefile
211 $ find . | sort
211 $ find . | sort
212 .
212 .
213 ./baz
213 ./baz
214 ./baz/largefile
214 ./baz/largefile
215 ./dirb
215 ./dirb
216 ./dirb/largefile
216 ./dirb/largefile
217 ./foo
217 ./foo
218 $ cd ../../a
218 $ cd ../../a
219
219
220 #if hgweb
220 #if serve
221 Test display of largefiles in hgweb
221 Test display of largefiles in hgweb
222
222
223 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
223 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
224 $ cat ../hg.pid >> $DAEMON_PIDS
224 $ cat ../hg.pid >> $DAEMON_PIDS
225 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
225 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
226 200 Script output follows
226 200 Script output follows
227
227
228
228
229 drwxr-xr-x sub
229 drwxr-xr-x sub
230 -rw-r--r-- 41 large3
230 -rw-r--r-- 41 large3
231 -rw-r--r-- 9 normal3
231 -rw-r--r-- 9 normal3
232
232
233
233
234 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
234 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
235 200 Script output follows
235 200 Script output follows
236
236
237
237
238 -rw-r--r-- 41 large4
238 -rw-r--r-- 41 large4
239 -rw-r--r-- 9 normal4
239 -rw-r--r-- 9 normal4
240
240
241
241
242 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
242 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
243 #endif
243 #endif
244
244
245 Test archiving the various revisions. These hit corner cases known with
245 Test archiving the various revisions. These hit corner cases known with
246 archiving.
246 archiving.
247
247
248 $ hg archive -r 0 ../archive0
248 $ hg archive -r 0 ../archive0
249 $ hg archive -r 1 ../archive1
249 $ hg archive -r 1 ../archive1
250 $ hg archive -r 2 ../archive2
250 $ hg archive -r 2 ../archive2
251 $ hg archive -r 3 ../archive3
251 $ hg archive -r 3 ../archive3
252 $ hg archive -r 4 ../archive4
252 $ hg archive -r 4 ../archive4
253 $ cd ../archive0
253 $ cd ../archive0
254 $ cat normal1
254 $ cat normal1
255 normal1
255 normal1
256 $ cat large1
256 $ cat large1
257 large1
257 large1
258 $ cat sub/normal2
258 $ cat sub/normal2
259 normal2
259 normal2
260 $ cat sub/large2
260 $ cat sub/large2
261 large2
261 large2
262 $ cd ../archive1
262 $ cd ../archive1
263 $ cat normal1
263 $ cat normal1
264 normal11
264 normal11
265 $ cat large1
265 $ cat large1
266 large11
266 large11
267 $ cat sub/normal2
267 $ cat sub/normal2
268 normal22
268 normal22
269 $ cat sub/large2
269 $ cat sub/large2
270 large22
270 large22
271 $ cd ../archive2
271 $ cd ../archive2
272 $ ls
272 $ ls
273 sub
273 sub
274 $ cat sub/normal2
274 $ cat sub/normal2
275 normal22
275 normal22
276 $ cat sub/large2
276 $ cat sub/large2
277 large22
277 large22
278 $ cd ../archive3
278 $ cd ../archive3
279 $ cat normal1
279 $ cat normal1
280 normal22
280 normal22
281 $ cat large1
281 $ cat large1
282 large22
282 large22
283 $ cat sub/normal2
283 $ cat sub/normal2
284 normal22
284 normal22
285 $ cat sub/large2
285 $ cat sub/large2
286 large22
286 large22
287 $ cd ../archive4
287 $ cd ../archive4
288 $ cat normal3
288 $ cat normal3
289 normal22
289 normal22
290 $ cat large3
290 $ cat large3
291 large22
291 large22
292 $ cat sub/normal4
292 $ cat sub/normal4
293 normal22
293 normal22
294 $ cat sub/large4
294 $ cat sub/large4
295 large22
295 large22
296
296
297 Commit corner case: specify files to commit.
297 Commit corner case: specify files to commit.
298
298
299 $ cd ../a
299 $ cd ../a
300 $ echo normal3 > normal3
300 $ echo normal3 > normal3
301 $ echo large3 > large3
301 $ echo large3 > large3
302 $ echo normal4 > sub/normal4
302 $ echo normal4 > sub/normal4
303 $ echo large4 > sub/large4
303 $ echo large4 > sub/large4
304 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
304 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
305 Invoking status precommit hook
305 Invoking status precommit hook
306 M large3
306 M large3
307 M normal3
307 M normal3
308 M sub/large4
308 M sub/large4
309 M sub/normal4
309 M sub/normal4
310 $ cat normal3
310 $ cat normal3
311 normal3
311 normal3
312 $ cat large3
312 $ cat large3
313 large3
313 large3
314 $ cat sub/normal4
314 $ cat sub/normal4
315 normal4
315 normal4
316 $ cat sub/large4
316 $ cat sub/large4
317 large4
317 large4
318
318
319 One more commit corner case: commit from a subdirectory.
319 One more commit corner case: commit from a subdirectory.
320
320
321 $ cd ../a
321 $ cd ../a
322 $ echo normal33 > normal3
322 $ echo normal33 > normal3
323 $ echo large33 > large3
323 $ echo large33 > large3
324 $ echo normal44 > sub/normal4
324 $ echo normal44 > sub/normal4
325 $ echo large44 > sub/large4
325 $ echo large44 > sub/large4
326 $ cd sub
326 $ cd sub
327 $ hg commit -m "edit files yet again"
327 $ hg commit -m "edit files yet again"
328 Invoking status precommit hook
328 Invoking status precommit hook
329 M large3
329 M large3
330 M normal3
330 M normal3
331 M sub/large4
331 M sub/large4
332 M sub/normal4
332 M sub/normal4
333 $ cat ../normal3
333 $ cat ../normal3
334 normal33
334 normal33
335 $ cat ../large3
335 $ cat ../large3
336 large33
336 large33
337 $ cat normal4
337 $ cat normal4
338 normal44
338 normal44
339 $ cat large4
339 $ cat large4
340 large44
340 large44
341
341
342 Committing standins is not allowed.
342 Committing standins is not allowed.
343
343
344 $ cd ..
344 $ cd ..
345 $ echo large3 > large3
345 $ echo large3 > large3
346 $ hg commit .hglf/large3 -m "try to commit standin"
346 $ hg commit .hglf/large3 -m "try to commit standin"
347 abort: file ".hglf/large3" is a largefile standin
347 abort: file ".hglf/large3" is a largefile standin
348 (commit the largefile itself instead)
348 (commit the largefile itself instead)
349 [255]
349 [255]
350
350
351 Corner cases for adding largefiles.
351 Corner cases for adding largefiles.
352
352
353 $ echo large5 > large5
353 $ echo large5 > large5
354 $ hg add --large large5
354 $ hg add --large large5
355 $ hg add --large large5
355 $ hg add --large large5
356 large5 already a largefile
356 large5 already a largefile
357 $ mkdir sub2
357 $ mkdir sub2
358 $ echo large6 > sub2/large6
358 $ echo large6 > sub2/large6
359 $ echo large7 > sub2/large7
359 $ echo large7 > sub2/large7
360 $ hg add --large sub2
360 $ hg add --large sub2
361 adding sub2/large6 as a largefile (glob)
361 adding sub2/large6 as a largefile (glob)
362 adding sub2/large7 as a largefile (glob)
362 adding sub2/large7 as a largefile (glob)
363 $ hg st
363 $ hg st
364 M large3
364 M large3
365 A large5
365 A large5
366 A sub2/large6
366 A sub2/large6
367 A sub2/large7
367 A sub2/large7
368
368
369 Committing directories containing only largefiles.
369 Committing directories containing only largefiles.
370
370
371 $ mkdir -p z/y/x/m
371 $ mkdir -p z/y/x/m
372 $ touch z/y/x/m/large1
372 $ touch z/y/x/m/large1
373 $ touch z/y/x/large2
373 $ touch z/y/x/large2
374 $ hg add --large z/y/x/m/large1 z/y/x/large2
374 $ hg add --large z/y/x/m/large1 z/y/x/large2
375 $ hg commit -m "Subdir with directory only containing largefiles" z
375 $ hg commit -m "Subdir with directory only containing largefiles" z
376 Invoking status precommit hook
376 Invoking status precommit hook
377 M large3
377 M large3
378 A large5
378 A large5
379 A sub2/large6
379 A sub2/large6
380 A sub2/large7
380 A sub2/large7
381 A z/y/x/large2
381 A z/y/x/large2
382 A z/y/x/m/large1
382 A z/y/x/m/large1
383 $ hg rollback --quiet
383 $ hg rollback --quiet
384 $ touch z/y/x/m/normal
384 $ touch z/y/x/m/normal
385 $ hg add z/y/x/m/normal
385 $ hg add z/y/x/m/normal
386 $ hg commit -m "Subdir with mixed contents" z
386 $ hg commit -m "Subdir with mixed contents" z
387 Invoking status precommit hook
387 Invoking status precommit hook
388 M large3
388 M large3
389 A large5
389 A large5
390 A sub2/large6
390 A sub2/large6
391 A sub2/large7
391 A sub2/large7
392 A z/y/x/large2
392 A z/y/x/large2
393 A z/y/x/m/large1
393 A z/y/x/m/large1
394 A z/y/x/m/normal
394 A z/y/x/m/normal
395 $ hg st
395 $ hg st
396 M large3
396 M large3
397 A large5
397 A large5
398 A sub2/large6
398 A sub2/large6
399 A sub2/large7
399 A sub2/large7
400 $ hg rollback --quiet
400 $ hg rollback --quiet
401 $ hg revert z/y/x/large2 z/y/x/m/large1
401 $ hg revert z/y/x/large2 z/y/x/m/large1
402 $ rm z/y/x/large2 z/y/x/m/large1
402 $ rm z/y/x/large2 z/y/x/m/large1
403 $ hg commit -m "Subdir with normal contents" z
403 $ hg commit -m "Subdir with normal contents" z
404 Invoking status precommit hook
404 Invoking status precommit hook
405 M large3
405 M large3
406 A large5
406 A large5
407 A sub2/large6
407 A sub2/large6
408 A sub2/large7
408 A sub2/large7
409 A z/y/x/m/normal
409 A z/y/x/m/normal
410 $ hg st
410 $ hg st
411 M large3
411 M large3
412 A large5
412 A large5
413 A sub2/large6
413 A sub2/large6
414 A sub2/large7
414 A sub2/large7
415 $ hg rollback --quiet
415 $ hg rollback --quiet
416 $ hg revert --quiet z
416 $ hg revert --quiet z
417 $ hg commit -m "Empty subdir" z
417 $ hg commit -m "Empty subdir" z
418 abort: z: no match under directory!
418 abort: z: no match under directory!
419 [255]
419 [255]
420 $ rm -rf z
420 $ rm -rf z
421 $ hg ci -m "standin" .hglf
421 $ hg ci -m "standin" .hglf
422 abort: file ".hglf" is a largefile standin
422 abort: file ".hglf" is a largefile standin
423 (commit the largefile itself instead)
423 (commit the largefile itself instead)
424 [255]
424 [255]
425
425
426 Test "hg status" with combination of 'file pattern' and 'directory
426 Test "hg status" with combination of 'file pattern' and 'directory
427 pattern' for largefiles:
427 pattern' for largefiles:
428
428
429 $ hg status sub2/large6 sub2
429 $ hg status sub2/large6 sub2
430 A sub2/large6
430 A sub2/large6
431 A sub2/large7
431 A sub2/large7
432
432
433 Config settings (pattern **.dat, minsize 2 MB) are respected.
433 Config settings (pattern **.dat, minsize 2 MB) are respected.
434
434
435 $ echo testdata > test.dat
435 $ echo testdata > test.dat
436 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
436 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
437 $ hg add
437 $ hg add
438 adding reallylarge as a largefile
438 adding reallylarge as a largefile
439 adding test.dat as a largefile
439 adding test.dat as a largefile
440
440
441 Test that minsize and --lfsize handle float values;
441 Test that minsize and --lfsize handle float values;
442 also tests that --lfsize overrides largefiles.minsize.
442 also tests that --lfsize overrides largefiles.minsize.
443 (0.250 MB = 256 kB = 262144 B)
443 (0.250 MB = 256 kB = 262144 B)
444
444
445 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
445 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
446 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
446 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
447 $ hg --config largefiles.minsize=.25 add
447 $ hg --config largefiles.minsize=.25 add
448 adding ratherlarge as a largefile
448 adding ratherlarge as a largefile
449 adding medium
449 adding medium
450 $ hg forget medium
450 $ hg forget medium
451 $ hg --config largefiles.minsize=.25 add --lfsize=.125
451 $ hg --config largefiles.minsize=.25 add --lfsize=.125
452 adding medium as a largefile
452 adding medium as a largefile
453 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
453 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
454 $ hg --config largefiles.minsize=.25 add --lfsize=.125
454 $ hg --config largefiles.minsize=.25 add --lfsize=.125
455 adding notlarge
455 adding notlarge
456 $ hg forget notlarge
456 $ hg forget notlarge
457
457
458 Test forget on largefiles.
458 Test forget on largefiles.
459
459
460 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
460 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
461 $ hg commit -m "add/edit more largefiles"
461 $ hg commit -m "add/edit more largefiles"
462 Invoking status precommit hook
462 Invoking status precommit hook
463 A sub2/large6
463 A sub2/large6
464 A sub2/large7
464 A sub2/large7
465 R large3
465 R large3
466 ? large5
466 ? large5
467 ? medium
467 ? medium
468 ? notlarge
468 ? notlarge
469 ? ratherlarge
469 ? ratherlarge
470 ? reallylarge
470 ? reallylarge
471 ? test.dat
471 ? test.dat
472 $ hg st
472 $ hg st
473 ? large3
473 ? large3
474 ? large5
474 ? large5
475 ? medium
475 ? medium
476 ? notlarge
476 ? notlarge
477 ? ratherlarge
477 ? ratherlarge
478 ? reallylarge
478 ? reallylarge
479 ? test.dat
479 ? test.dat
480
480
481 Purge with largefiles: verify that largefiles are still in the working
481 Purge with largefiles: verify that largefiles are still in the working
482 dir after a purge.
482 dir after a purge.
483
483
484 $ hg purge --all
484 $ hg purge --all
485 $ cat sub/large4
485 $ cat sub/large4
486 large44
486 large44
487 $ cat sub2/large6
487 $ cat sub2/large6
488 large6
488 large6
489 $ cat sub2/large7
489 $ cat sub2/large7
490 large7
490 large7
491
491
492 Test addremove: verify that files that should be added as largfiles are added as
492 Test addremove: verify that files that should be added as largfiles are added as
493 such and that already-existing largfiles are not added as normal files by
493 such and that already-existing largfiles are not added as normal files by
494 accident.
494 accident.
495
495
496 $ rm normal3
496 $ rm normal3
497 $ rm sub/large4
497 $ rm sub/large4
498 $ echo "testing addremove with patterns" > testaddremove.dat
498 $ echo "testing addremove with patterns" > testaddremove.dat
499 $ echo "normaladdremove" > normaladdremove
499 $ echo "normaladdremove" > normaladdremove
500 $ hg addremove
500 $ hg addremove
501 removing sub/large4
501 removing sub/large4
502 adding testaddremove.dat as a largefile
502 adding testaddremove.dat as a largefile
503 removing normal3
503 removing normal3
504 adding normaladdremove
504 adding normaladdremove
505
505
506 Test addremove with -R
506 Test addremove with -R
507
507
508 $ hg up -C
508 $ hg up -C
509 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
509 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
510 getting changed largefiles
510 getting changed largefiles
511 1 largefiles updated, 0 removed
511 1 largefiles updated, 0 removed
512 $ rm normal3
512 $ rm normal3
513 $ rm sub/large4
513 $ rm sub/large4
514 $ echo "testing addremove with patterns" > testaddremove.dat
514 $ echo "testing addremove with patterns" > testaddremove.dat
515 $ echo "normaladdremove" > normaladdremove
515 $ echo "normaladdremove" > normaladdremove
516 $ cd ..
516 $ cd ..
517 $ hg -R a addremove
517 $ hg -R a addremove
518 removing sub/large4
518 removing sub/large4
519 adding a/testaddremove.dat as a largefile (glob)
519 adding a/testaddremove.dat as a largefile (glob)
520 removing normal3
520 removing normal3
521 adding normaladdremove
521 adding normaladdremove
522 $ cd a
522 $ cd a
523
523
524 Test 3364
524 Test 3364
525 $ hg clone . ../addrm
525 $ hg clone . ../addrm
526 updating to branch default
526 updating to branch default
527 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
527 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
528 getting changed largefiles
528 getting changed largefiles
529 3 largefiles updated, 0 removed
529 3 largefiles updated, 0 removed
530 $ cd ../addrm
530 $ cd ../addrm
531 $ cat >> .hg/hgrc <<EOF
531 $ cat >> .hg/hgrc <<EOF
532 > [hooks]
532 > [hooks]
533 > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
533 > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
534 > EOF
534 > EOF
535 $ touch foo
535 $ touch foo
536 $ hg add --large foo
536 $ hg add --large foo
537 $ hg ci -m "add foo"
537 $ hg ci -m "add foo"
538 Invoking status precommit hook
538 Invoking status precommit hook
539 A foo
539 A foo
540 Invoking status postcommit hook
540 Invoking status postcommit hook
541 C foo
541 C foo
542 C normal3
542 C normal3
543 C sub/large4
543 C sub/large4
544 C sub/normal4
544 C sub/normal4
545 C sub2/large6
545 C sub2/large6
546 C sub2/large7
546 C sub2/large7
547 $ rm foo
547 $ rm foo
548 $ hg st
548 $ hg st
549 ! foo
549 ! foo
550 hmm.. no precommit invoked, but there is a postcommit??
550 hmm.. no precommit invoked, but there is a postcommit??
551 $ hg ci -m "will not checkin"
551 $ hg ci -m "will not checkin"
552 nothing changed
552 nothing changed
553 Invoking status postcommit hook
553 Invoking status postcommit hook
554 ! foo
554 ! foo
555 C normal3
555 C normal3
556 C sub/large4
556 C sub/large4
557 C sub/normal4
557 C sub/normal4
558 C sub2/large6
558 C sub2/large6
559 C sub2/large7
559 C sub2/large7
560 [1]
560 [1]
561 $ hg addremove
561 $ hg addremove
562 removing foo
562 removing foo
563 $ hg st
563 $ hg st
564 R foo
564 R foo
565 $ hg ci -m "used to say nothing changed"
565 $ hg ci -m "used to say nothing changed"
566 Invoking status precommit hook
566 Invoking status precommit hook
567 R foo
567 R foo
568 Invoking status postcommit hook
568 Invoking status postcommit hook
569 C normal3
569 C normal3
570 C sub/large4
570 C sub/large4
571 C sub/normal4
571 C sub/normal4
572 C sub2/large6
572 C sub2/large6
573 C sub2/large7
573 C sub2/large7
574 $ hg st
574 $ hg st
575
575
576 Test 3507 (both normal files and largefiles were a problem)
576 Test 3507 (both normal files and largefiles were a problem)
577
577
578 $ touch normal
578 $ touch normal
579 $ touch large
579 $ touch large
580 $ hg add normal
580 $ hg add normal
581 $ hg add --large large
581 $ hg add --large large
582 $ hg ci -m "added"
582 $ hg ci -m "added"
583 Invoking status precommit hook
583 Invoking status precommit hook
584 A large
584 A large
585 A normal
585 A normal
586 Invoking status postcommit hook
586 Invoking status postcommit hook
587 C large
587 C large
588 C normal
588 C normal
589 C normal3
589 C normal3
590 C sub/large4
590 C sub/large4
591 C sub/normal4
591 C sub/normal4
592 C sub2/large6
592 C sub2/large6
593 C sub2/large7
593 C sub2/large7
594 $ hg remove normal
594 $ hg remove normal
595 $ hg addremove --traceback
595 $ hg addremove --traceback
596 $ hg ci -m "addremoved normal"
596 $ hg ci -m "addremoved normal"
597 Invoking status precommit hook
597 Invoking status precommit hook
598 R normal
598 R normal
599 Invoking status postcommit hook
599 Invoking status postcommit hook
600 C large
600 C large
601 C normal3
601 C normal3
602 C sub/large4
602 C sub/large4
603 C sub/normal4
603 C sub/normal4
604 C sub2/large6
604 C sub2/large6
605 C sub2/large7
605 C sub2/large7
606 $ hg up -C '.^'
606 $ hg up -C '.^'
607 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
607 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
608 getting changed largefiles
608 getting changed largefiles
609 0 largefiles updated, 0 removed
609 0 largefiles updated, 0 removed
610 $ hg remove large
610 $ hg remove large
611 $ hg addremove --traceback
611 $ hg addremove --traceback
612 $ hg ci -m "removed large"
612 $ hg ci -m "removed large"
613 Invoking status precommit hook
613 Invoking status precommit hook
614 R large
614 R large
615 created new head
615 created new head
616 Invoking status postcommit hook
616 Invoking status postcommit hook
617 C normal
617 C normal
618 C normal3
618 C normal3
619 C sub/large4
619 C sub/large4
620 C sub/normal4
620 C sub/normal4
621 C sub2/large6
621 C sub2/large6
622 C sub2/large7
622 C sub2/large7
623
623
624 Test commit -A (issue 3542)
624 Test commit -A (issue 3542)
625 $ echo large8 > large8
625 $ echo large8 > large8
626 $ hg add --large large8
626 $ hg add --large large8
627 $ hg ci -Am 'this used to add large8 as normal and commit both'
627 $ hg ci -Am 'this used to add large8 as normal and commit both'
628 Invoking status precommit hook
628 Invoking status precommit hook
629 A large8
629 A large8
630 Invoking status postcommit hook
630 Invoking status postcommit hook
631 C large8
631 C large8
632 C normal
632 C normal
633 C normal3
633 C normal3
634 C sub/large4
634 C sub/large4
635 C sub/normal4
635 C sub/normal4
636 C sub2/large6
636 C sub2/large6
637 C sub2/large7
637 C sub2/large7
638 $ rm large8
638 $ rm large8
639 $ hg ci -Am 'this used to not notice the rm'
639 $ hg ci -Am 'this used to not notice the rm'
640 removing large8
640 removing large8
641 Invoking status precommit hook
641 Invoking status precommit hook
642 R large8
642 R large8
643 Invoking status postcommit hook
643 Invoking status postcommit hook
644 C normal
644 C normal
645 C normal3
645 C normal3
646 C sub/large4
646 C sub/large4
647 C sub/normal4
647 C sub/normal4
648 C sub2/large6
648 C sub2/large6
649 C sub2/large7
649 C sub2/large7
650
650
651 Test that a standin can't be added as a large file
651 Test that a standin can't be added as a large file
652
652
653 $ touch large
653 $ touch large
654 $ hg add --large large
654 $ hg add --large large
655 $ hg ci -m "add"
655 $ hg ci -m "add"
656 Invoking status precommit hook
656 Invoking status precommit hook
657 A large
657 A large
658 Invoking status postcommit hook
658 Invoking status postcommit hook
659 C large
659 C large
660 C normal
660 C normal
661 C normal3
661 C normal3
662 C sub/large4
662 C sub/large4
663 C sub/normal4
663 C sub/normal4
664 C sub2/large6
664 C sub2/large6
665 C sub2/large7
665 C sub2/large7
666 $ hg remove large
666 $ hg remove large
667 $ touch large
667 $ touch large
668 $ hg addremove --config largefiles.patterns=**large --traceback
668 $ hg addremove --config largefiles.patterns=**large --traceback
669 adding large as a largefile
669 adding large as a largefile
670
670
671 Test that outgoing --large works (with revsets too)
671 Test that outgoing --large works (with revsets too)
672 $ hg outgoing --rev '.^' --large
672 $ hg outgoing --rev '.^' --large
673 comparing with $TESTTMP/a (glob)
673 comparing with $TESTTMP/a (glob)
674 searching for changes
674 searching for changes
675 changeset: 8:c02fd3b77ec4
675 changeset: 8:c02fd3b77ec4
676 user: test
676 user: test
677 date: Thu Jan 01 00:00:00 1970 +0000
677 date: Thu Jan 01 00:00:00 1970 +0000
678 summary: add foo
678 summary: add foo
679
679
680 changeset: 9:289dd08c9bbb
680 changeset: 9:289dd08c9bbb
681 user: test
681 user: test
682 date: Thu Jan 01 00:00:00 1970 +0000
682 date: Thu Jan 01 00:00:00 1970 +0000
683 summary: used to say nothing changed
683 summary: used to say nothing changed
684
684
685 changeset: 10:34f23ac6ac12
685 changeset: 10:34f23ac6ac12
686 user: test
686 user: test
687 date: Thu Jan 01 00:00:00 1970 +0000
687 date: Thu Jan 01 00:00:00 1970 +0000
688 summary: added
688 summary: added
689
689
690 changeset: 12:710c1b2f523c
690 changeset: 12:710c1b2f523c
691 parent: 10:34f23ac6ac12
691 parent: 10:34f23ac6ac12
692 user: test
692 user: test
693 date: Thu Jan 01 00:00:00 1970 +0000
693 date: Thu Jan 01 00:00:00 1970 +0000
694 summary: removed large
694 summary: removed large
695
695
696 changeset: 13:0a3e75774479
696 changeset: 13:0a3e75774479
697 user: test
697 user: test
698 date: Thu Jan 01 00:00:00 1970 +0000
698 date: Thu Jan 01 00:00:00 1970 +0000
699 summary: this used to add large8 as normal and commit both
699 summary: this used to add large8 as normal and commit both
700
700
701 changeset: 14:84f3d378175c
701 changeset: 14:84f3d378175c
702 user: test
702 user: test
703 date: Thu Jan 01 00:00:00 1970 +0000
703 date: Thu Jan 01 00:00:00 1970 +0000
704 summary: this used to not notice the rm
704 summary: this used to not notice the rm
705
705
706 searching for changes
706 searching for changes
707 largefiles to upload:
707 largefiles to upload:
708 large8
708 large8
709 large
709 large
710 foo
710 foo
711
711
712 $ cd ../a
712 $ cd ../a
713
713
714 Clone a largefiles repo.
714 Clone a largefiles repo.
715
715
716 $ hg clone . ../b
716 $ hg clone . ../b
717 updating to branch default
717 updating to branch default
718 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
718 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
719 getting changed largefiles
719 getting changed largefiles
720 3 largefiles updated, 0 removed
720 3 largefiles updated, 0 removed
721 $ cd ../b
721 $ cd ../b
722 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
722 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
723 7:daea875e9014 add/edit more largefiles
723 7:daea875e9014 add/edit more largefiles
724 6:4355d653f84f edit files yet again
724 6:4355d653f84f edit files yet again
725 5:9d5af5072dbd edit files again
725 5:9d5af5072dbd edit files again
726 4:74c02385b94c move files
726 4:74c02385b94c move files
727 3:9e8fbc4bce62 copy files
727 3:9e8fbc4bce62 copy files
728 2:51a0ae4d5864 remove files
728 2:51a0ae4d5864 remove files
729 1:ce8896473775 edit files
729 1:ce8896473775 edit files
730 0:30d30fe6a5be add files
730 0:30d30fe6a5be add files
731 $ cat normal3
731 $ cat normal3
732 normal33
732 normal33
733 $ cat sub/normal4
733 $ cat sub/normal4
734 normal44
734 normal44
735 $ cat sub/large4
735 $ cat sub/large4
736 large44
736 large44
737 $ cat sub2/large6
737 $ cat sub2/large6
738 large6
738 large6
739 $ cat sub2/large7
739 $ cat sub2/large7
740 large7
740 large7
741 $ cd ..
741 $ cd ..
742 $ hg clone a -r 3 c
742 $ hg clone a -r 3 c
743 adding changesets
743 adding changesets
744 adding manifests
744 adding manifests
745 adding file changes
745 adding file changes
746 added 4 changesets with 10 changes to 4 files
746 added 4 changesets with 10 changes to 4 files
747 updating to branch default
747 updating to branch default
748 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
748 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
749 getting changed largefiles
749 getting changed largefiles
750 2 largefiles updated, 0 removed
750 2 largefiles updated, 0 removed
751 $ cd c
751 $ cd c
752 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
752 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
753 3:9e8fbc4bce62 copy files
753 3:9e8fbc4bce62 copy files
754 2:51a0ae4d5864 remove files
754 2:51a0ae4d5864 remove files
755 1:ce8896473775 edit files
755 1:ce8896473775 edit files
756 0:30d30fe6a5be add files
756 0:30d30fe6a5be add files
757 $ cat normal1
757 $ cat normal1
758 normal22
758 normal22
759 $ cat large1
759 $ cat large1
760 large22
760 large22
761 $ cat sub/normal2
761 $ cat sub/normal2
762 normal22
762 normal22
763 $ cat sub/large2
763 $ cat sub/large2
764 large22
764 large22
765
765
766 Old revisions of a clone have correct largefiles content (this also
766 Old revisions of a clone have correct largefiles content (this also
767 tests update).
767 tests update).
768
768
769 $ hg update -r 1
769 $ hg update -r 1
770 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
770 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
771 getting changed largefiles
771 getting changed largefiles
772 1 largefiles updated, 0 removed
772 1 largefiles updated, 0 removed
773 $ cat large1
773 $ cat large1
774 large11
774 large11
775 $ cat sub/large2
775 $ cat sub/large2
776 large22
776 large22
777 $ cd ..
777 $ cd ..
778
778
779 Test cloning with --all-largefiles flag
779 Test cloning with --all-largefiles flag
780
780
781 $ rm "${USERCACHE}"/*
781 $ rm "${USERCACHE}"/*
782 $ hg clone --all-largefiles a a-backup
782 $ hg clone --all-largefiles a a-backup
783 updating to branch default
783 updating to branch default
784 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
784 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
785 getting changed largefiles
785 getting changed largefiles
786 3 largefiles updated, 0 removed
786 3 largefiles updated, 0 removed
787 8 additional largefiles cached
787 8 additional largefiles cached
788
788
789 $ rm "${USERCACHE}"/*
789 $ rm "${USERCACHE}"/*
790 $ hg clone --all-largefiles -u 0 a a-clone0
790 $ hg clone --all-largefiles -u 0 a a-clone0
791 updating to branch default
791 updating to branch default
792 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
792 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 getting changed largefiles
793 getting changed largefiles
794 2 largefiles updated, 0 removed
794 2 largefiles updated, 0 removed
795 9 additional largefiles cached
795 9 additional largefiles cached
796 $ hg -R a-clone0 sum
796 $ hg -R a-clone0 sum
797 parent: 0:30d30fe6a5be
797 parent: 0:30d30fe6a5be
798 add files
798 add files
799 branch: default
799 branch: default
800 commit: (clean)
800 commit: (clean)
801 update: 7 new changesets (update)
801 update: 7 new changesets (update)
802
802
803 $ rm "${USERCACHE}"/*
803 $ rm "${USERCACHE}"/*
804 $ hg clone --all-largefiles -u 1 a a-clone1
804 $ hg clone --all-largefiles -u 1 a a-clone1
805 updating to branch default
805 updating to branch default
806 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
806 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
807 getting changed largefiles
807 getting changed largefiles
808 2 largefiles updated, 0 removed
808 2 largefiles updated, 0 removed
809 8 additional largefiles cached
809 8 additional largefiles cached
810 $ hg -R a-clone1 sum
810 $ hg -R a-clone1 sum
811 parent: 1:ce8896473775
811 parent: 1:ce8896473775
812 edit files
812 edit files
813 branch: default
813 branch: default
814 commit: (clean)
814 commit: (clean)
815 update: 6 new changesets (update)
815 update: 6 new changesets (update)
816
816
817 $ rm "${USERCACHE}"/*
817 $ rm "${USERCACHE}"/*
818 $ hg clone --all-largefiles -U a a-clone-u
818 $ hg clone --all-largefiles -U a a-clone-u
819 11 additional largefiles cached
819 11 additional largefiles cached
820 $ hg -R a-clone-u sum
820 $ hg -R a-clone-u sum
821 parent: -1:000000000000 (no revision checked out)
821 parent: -1:000000000000 (no revision checked out)
822 branch: default
822 branch: default
823 commit: (clean)
823 commit: (clean)
824 update: 8 new changesets (update)
824 update: 8 new changesets (update)
825
825
826 $ mkdir xyz
826 $ mkdir xyz
827 $ cd xyz
827 $ cd xyz
828 $ hg clone ../a
828 $ hg clone ../a
829 destination directory: a
829 destination directory: a
830 updating to branch default
830 updating to branch default
831 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
831 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
832 getting changed largefiles
832 getting changed largefiles
833 3 largefiles updated, 0 removed
833 3 largefiles updated, 0 removed
834 $ cd ..
834 $ cd ..
835
835
836 Ensure base clone command argument validation
836 Ensure base clone command argument validation
837
837
838 $ hg clone -U -u 0 a a-clone-failure
838 $ hg clone -U -u 0 a a-clone-failure
839 abort: cannot specify both --noupdate and --updaterev
839 abort: cannot specify both --noupdate and --updaterev
840 [255]
840 [255]
841
841
842 $ hg clone --all-largefiles a ssh://localhost/a
842 $ hg clone --all-largefiles a ssh://localhost/a
843 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
843 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
844 [255]
844 [255]
845
845
846 Test pulling with --all-largefiles flag. Also test that the largefiles are
846 Test pulling with --all-largefiles flag. Also test that the largefiles are
847 downloaded from 'default' instead of 'default-push' when no source is specified
847 downloaded from 'default' instead of 'default-push' when no source is specified
848 (issue3584)
848 (issue3584)
849
849
850 $ rm -Rf a-backup
850 $ rm -Rf a-backup
851 $ hg clone -r 1 a a-backup
851 $ hg clone -r 1 a a-backup
852 adding changesets
852 adding changesets
853 adding manifests
853 adding manifests
854 adding file changes
854 adding file changes
855 added 2 changesets with 8 changes to 4 files
855 added 2 changesets with 8 changes to 4 files
856 updating to branch default
856 updating to branch default
857 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
857 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
858 getting changed largefiles
858 getting changed largefiles
859 2 largefiles updated, 0 removed
859 2 largefiles updated, 0 removed
860 $ rm "${USERCACHE}"/*
860 $ rm "${USERCACHE}"/*
861 $ cd a-backup
861 $ cd a-backup
862 $ hg pull --all-largefiles --config paths.default-push=bogus/path
862 $ hg pull --all-largefiles --config paths.default-push=bogus/path
863 pulling from $TESTTMP/a (glob)
863 pulling from $TESTTMP/a (glob)
864 searching for changes
864 searching for changes
865 adding changesets
865 adding changesets
866 adding manifests
866 adding manifests
867 adding file changes
867 adding file changes
868 added 6 changesets with 16 changes to 8 files
868 added 6 changesets with 16 changes to 8 files
869 (run 'hg update' to get a working copy)
869 (run 'hg update' to get a working copy)
870 caching new largefiles
870 caching new largefiles
871 3 largefiles cached
871 3 largefiles cached
872 3 additional largefiles cached
872 3 additional largefiles cached
873 $ cd ..
873 $ cd ..
874
874
875 Rebasing between two repositories does not revert largefiles to old
875 Rebasing between two repositories does not revert largefiles to old
876 revisions (this was a very bad bug that took a lot of work to fix).
876 revisions (this was a very bad bug that took a lot of work to fix).
877
877
878 $ hg clone a d
878 $ hg clone a d
879 updating to branch default
879 updating to branch default
880 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
880 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
881 getting changed largefiles
881 getting changed largefiles
882 3 largefiles updated, 0 removed
882 3 largefiles updated, 0 removed
883 $ cd b
883 $ cd b
884 $ echo large4-modified > sub/large4
884 $ echo large4-modified > sub/large4
885 $ echo normal3-modified > normal3
885 $ echo normal3-modified > normal3
886 $ hg commit -m "modify normal file and largefile in repo b"
886 $ hg commit -m "modify normal file and largefile in repo b"
887 Invoking status precommit hook
887 Invoking status precommit hook
888 M normal3
888 M normal3
889 M sub/large4
889 M sub/large4
890 $ cd ../d
890 $ cd ../d
891 $ echo large6-modified > sub2/large6
891 $ echo large6-modified > sub2/large6
892 $ echo normal4-modified > sub/normal4
892 $ echo normal4-modified > sub/normal4
893 $ hg commit -m "modify normal file largefile in repo d"
893 $ hg commit -m "modify normal file largefile in repo d"
894 Invoking status precommit hook
894 Invoking status precommit hook
895 M sub/normal4
895 M sub/normal4
896 M sub2/large6
896 M sub2/large6
897 $ cd ..
897 $ cd ..
898 $ hg clone d e
898 $ hg clone d e
899 updating to branch default
899 updating to branch default
900 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
900 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
901 getting changed largefiles
901 getting changed largefiles
902 3 largefiles updated, 0 removed
902 3 largefiles updated, 0 removed
903 $ cd d
903 $ cd d
904
904
905 More rebase testing, but also test that the largefiles are downloaded from
905 More rebase testing, but also test that the largefiles are downloaded from
906 'default' instead of 'default-push' when no source is specified (issue3584).
906 'default' instead of 'default-push' when no source is specified (issue3584).
907 The error messages go away if repo 'b' is created with --all-largefiles.
907 The error messages go away if repo 'b' is created with --all-largefiles.
908 $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b
908 $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b
909 pulling from $TESTTMP/b (glob)
909 pulling from $TESTTMP/b (glob)
910 searching for changes
910 searching for changes
911 adding changesets
911 adding changesets
912 adding manifests
912 adding manifests
913 adding file changes
913 adding file changes
914 added 1 changesets with 2 changes to 2 files (+1 heads)
914 added 1 changesets with 2 changes to 2 files (+1 heads)
915 Invoking status precommit hook
915 Invoking status precommit hook
916 M sub/normal4
916 M sub/normal4
917 M sub2/large6
917 M sub2/large6
918 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
918 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
919 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for large3: can't get file locally (glob)
919 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for large3: can't get file locally (glob)
920 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large4: can't get file locally (glob)
920 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large4: can't get file locally (glob)
921 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for large1: can't get file locally (glob)
921 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for large1: can't get file locally (glob)
922 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
922 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
923 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
923 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
924 error getting 5f78770c0e77ba4287ad6ef3071c9bf9c379742f from file:$TESTTMP/b for large1: can't get file locally (glob)
924 error getting 5f78770c0e77ba4287ad6ef3071c9bf9c379742f from file:$TESTTMP/b for large1: can't get file locally (glob)
925 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
925 error getting eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
926 error getting 4669e532d5b2c093a78eca010077e708a071bb64 from file:$TESTTMP/b for large1: can't get file locally (glob)
926 error getting 4669e532d5b2c093a78eca010077e708a071bb64 from file:$TESTTMP/b for large1: can't get file locally (glob)
927 error getting 1deebade43c8c498a3c8daddac0244dc55d1331d from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
927 error getting 1deebade43c8c498a3c8daddac0244dc55d1331d from file:$TESTTMP/b for sub/large2: can't get file locally (glob)
928 0 additional largefiles cached
928 0 additional largefiles cached
929 9 largefiles failed to download
929 9 largefiles failed to download
930 nothing to rebase
930 nothing to rebase
931 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
931 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
932 9:598410d3eb9a modify normal file largefile in repo d
932 9:598410d3eb9a modify normal file largefile in repo d
933 8:a381d2c8c80e modify normal file and largefile in repo b
933 8:a381d2c8c80e modify normal file and largefile in repo b
934 7:daea875e9014 add/edit more largefiles
934 7:daea875e9014 add/edit more largefiles
935 6:4355d653f84f edit files yet again
935 6:4355d653f84f edit files yet again
936 5:9d5af5072dbd edit files again
936 5:9d5af5072dbd edit files again
937 4:74c02385b94c move files
937 4:74c02385b94c move files
938 3:9e8fbc4bce62 copy files
938 3:9e8fbc4bce62 copy files
939 2:51a0ae4d5864 remove files
939 2:51a0ae4d5864 remove files
940 1:ce8896473775 edit files
940 1:ce8896473775 edit files
941 0:30d30fe6a5be add files
941 0:30d30fe6a5be add files
942 $ cat normal3
942 $ cat normal3
943 normal3-modified
943 normal3-modified
944 $ cat sub/normal4
944 $ cat sub/normal4
945 normal4-modified
945 normal4-modified
946 $ cat sub/large4
946 $ cat sub/large4
947 large4-modified
947 large4-modified
948 $ cat sub2/large6
948 $ cat sub2/large6
949 large6-modified
949 large6-modified
950 $ cat sub2/large7
950 $ cat sub2/large7
951 large7
951 large7
952 $ cd ../e
952 $ cd ../e
953 $ hg pull ../b
953 $ hg pull ../b
954 pulling from ../b
954 pulling from ../b
955 searching for changes
955 searching for changes
956 adding changesets
956 adding changesets
957 adding manifests
957 adding manifests
958 adding file changes
958 adding file changes
959 added 1 changesets with 2 changes to 2 files (+1 heads)
959 added 1 changesets with 2 changes to 2 files (+1 heads)
960 (run 'hg heads' to see heads, 'hg merge' to merge)
960 (run 'hg heads' to see heads, 'hg merge' to merge)
961 caching new largefiles
961 caching new largefiles
962 0 largefiles cached
962 0 largefiles cached
963 $ hg rebase
963 $ hg rebase
964 Invoking status precommit hook
964 Invoking status precommit hook
965 M sub/normal4
965 M sub/normal4
966 M sub2/large6
966 M sub2/large6
967 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
967 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
968 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
968 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
969 9:598410d3eb9a modify normal file largefile in repo d
969 9:598410d3eb9a modify normal file largefile in repo d
970 8:a381d2c8c80e modify normal file and largefile in repo b
970 8:a381d2c8c80e modify normal file and largefile in repo b
971 7:daea875e9014 add/edit more largefiles
971 7:daea875e9014 add/edit more largefiles
972 6:4355d653f84f edit files yet again
972 6:4355d653f84f edit files yet again
973 5:9d5af5072dbd edit files again
973 5:9d5af5072dbd edit files again
974 4:74c02385b94c move files
974 4:74c02385b94c move files
975 3:9e8fbc4bce62 copy files
975 3:9e8fbc4bce62 copy files
976 2:51a0ae4d5864 remove files
976 2:51a0ae4d5864 remove files
977 1:ce8896473775 edit files
977 1:ce8896473775 edit files
978 0:30d30fe6a5be add files
978 0:30d30fe6a5be add files
979 $ cat normal3
979 $ cat normal3
980 normal3-modified
980 normal3-modified
981 $ cat sub/normal4
981 $ cat sub/normal4
982 normal4-modified
982 normal4-modified
983 $ cat sub/large4
983 $ cat sub/large4
984 large4-modified
984 large4-modified
985 $ cat sub2/large6
985 $ cat sub2/large6
986 large6-modified
986 large6-modified
987 $ cat sub2/large7
987 $ cat sub2/large7
988 large7
988 large7
989
989
990 Rollback on largefiles.
990 Rollback on largefiles.
991
991
992 $ echo large4-modified-again > sub/large4
992 $ echo large4-modified-again > sub/large4
993 $ hg commit -m "Modify large4 again"
993 $ hg commit -m "Modify large4 again"
994 Invoking status precommit hook
994 Invoking status precommit hook
995 M sub/large4
995 M sub/large4
996 $ hg rollback
996 $ hg rollback
997 repository tip rolled back to revision 9 (undo commit)
997 repository tip rolled back to revision 9 (undo commit)
998 working directory now based on revision 9
998 working directory now based on revision 9
999 $ hg st
999 $ hg st
1000 M sub/large4
1000 M sub/large4
1001 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1001 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1002 9:598410d3eb9a modify normal file largefile in repo d
1002 9:598410d3eb9a modify normal file largefile in repo d
1003 8:a381d2c8c80e modify normal file and largefile in repo b
1003 8:a381d2c8c80e modify normal file and largefile in repo b
1004 7:daea875e9014 add/edit more largefiles
1004 7:daea875e9014 add/edit more largefiles
1005 6:4355d653f84f edit files yet again
1005 6:4355d653f84f edit files yet again
1006 5:9d5af5072dbd edit files again
1006 5:9d5af5072dbd edit files again
1007 4:74c02385b94c move files
1007 4:74c02385b94c move files
1008 3:9e8fbc4bce62 copy files
1008 3:9e8fbc4bce62 copy files
1009 2:51a0ae4d5864 remove files
1009 2:51a0ae4d5864 remove files
1010 1:ce8896473775 edit files
1010 1:ce8896473775 edit files
1011 0:30d30fe6a5be add files
1011 0:30d30fe6a5be add files
1012 $ cat sub/large4
1012 $ cat sub/large4
1013 large4-modified-again
1013 large4-modified-again
1014
1014
1015 "update --check" refuses to update with uncommitted changes.
1015 "update --check" refuses to update with uncommitted changes.
1016 $ hg update --check 8
1016 $ hg update --check 8
1017 abort: uncommitted local changes
1017 abort: uncommitted local changes
1018 [255]
1018 [255]
1019
1019
1020 "update --clean" leaves correct largefiles in working copy.
1020 "update --clean" leaves correct largefiles in working copy.
1021
1021
1022 $ hg update --clean
1022 $ hg update --clean
1023 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1023 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1024 getting changed largefiles
1024 getting changed largefiles
1025 1 largefiles updated, 0 removed
1025 1 largefiles updated, 0 removed
1026 $ cat normal3
1026 $ cat normal3
1027 normal3-modified
1027 normal3-modified
1028 $ cat sub/normal4
1028 $ cat sub/normal4
1029 normal4-modified
1029 normal4-modified
1030 $ cat sub/large4
1030 $ cat sub/large4
1031 large4-modified
1031 large4-modified
1032 $ cat sub2/large6
1032 $ cat sub2/large6
1033 large6-modified
1033 large6-modified
1034 $ cat sub2/large7
1034 $ cat sub2/large7
1035 large7
1035 large7
1036
1036
1037 Now "update check" is happy.
1037 Now "update check" is happy.
1038 $ hg update --check 8
1038 $ hg update --check 8
1039 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1039 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1040 getting changed largefiles
1040 getting changed largefiles
1041 1 largefiles updated, 0 removed
1041 1 largefiles updated, 0 removed
1042 $ hg update --check
1042 $ hg update --check
1043 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1043 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1044 getting changed largefiles
1044 getting changed largefiles
1045 1 largefiles updated, 0 removed
1045 1 largefiles updated, 0 removed
1046
1046
1047 Test removing empty largefiles directories on update
1047 Test removing empty largefiles directories on update
1048 $ test -d sub2 && echo "sub2 exists"
1048 $ test -d sub2 && echo "sub2 exists"
1049 sub2 exists
1049 sub2 exists
1050 $ hg update -q null
1050 $ hg update -q null
1051 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1051 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1052 [1]
1052 [1]
1053 $ hg update -q
1053 $ hg update -q
1054
1054
1055 Test hg remove removes empty largefiles directories
1055 Test hg remove removes empty largefiles directories
1056 $ test -d sub2 && echo "sub2 exists"
1056 $ test -d sub2 && echo "sub2 exists"
1057 sub2 exists
1057 sub2 exists
1058 $ hg remove sub2/*
1058 $ hg remove sub2/*
1059 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1059 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1060 [1]
1060 [1]
1061 $ hg revert sub2/large6 sub2/large7
1061 $ hg revert sub2/large6 sub2/large7
1062
1062
1063 "revert" works on largefiles (and normal files too).
1063 "revert" works on largefiles (and normal files too).
1064 $ echo hack3 >> normal3
1064 $ echo hack3 >> normal3
1065 $ echo hack4 >> sub/normal4
1065 $ echo hack4 >> sub/normal4
1066 $ echo hack4 >> sub/large4
1066 $ echo hack4 >> sub/large4
1067 $ rm sub2/large6
1067 $ rm sub2/large6
1068 $ hg revert sub2/large6
1068 $ hg revert sub2/large6
1069 $ hg rm sub2/large6
1069 $ hg rm sub2/large6
1070 $ echo new >> sub2/large8
1070 $ echo new >> sub2/large8
1071 $ hg add --large sub2/large8
1071 $ hg add --large sub2/large8
1072 # XXX we don't really want to report that we're reverting the standin;
1072 # XXX we don't really want to report that we're reverting the standin;
1073 # that's just an implementation detail. But I don't see an obvious fix. ;-(
1073 # that's just an implementation detail. But I don't see an obvious fix. ;-(
1074 $ hg revert sub
1074 $ hg revert sub
1075 reverting .hglf/sub/large4 (glob)
1075 reverting .hglf/sub/large4 (glob)
1076 reverting sub/normal4 (glob)
1076 reverting sub/normal4 (glob)
1077 $ hg status
1077 $ hg status
1078 M normal3
1078 M normal3
1079 A sub2/large8
1079 A sub2/large8
1080 R sub2/large6
1080 R sub2/large6
1081 ? sub/large4.orig
1081 ? sub/large4.orig
1082 ? sub/normal4.orig
1082 ? sub/normal4.orig
1083 $ cat sub/normal4
1083 $ cat sub/normal4
1084 normal4-modified
1084 normal4-modified
1085 $ cat sub/large4
1085 $ cat sub/large4
1086 large4-modified
1086 large4-modified
1087 $ hg revert -a --no-backup
1087 $ hg revert -a --no-backup
1088 undeleting .hglf/sub2/large6 (glob)
1088 undeleting .hglf/sub2/large6 (glob)
1089 forgetting .hglf/sub2/large8 (glob)
1089 forgetting .hglf/sub2/large8 (glob)
1090 reverting normal3
1090 reverting normal3
1091 $ hg status
1091 $ hg status
1092 ? sub/large4.orig
1092 ? sub/large4.orig
1093 ? sub/normal4.orig
1093 ? sub/normal4.orig
1094 ? sub2/large8
1094 ? sub2/large8
1095 $ cat normal3
1095 $ cat normal3
1096 normal3-modified
1096 normal3-modified
1097 $ cat sub2/large6
1097 $ cat sub2/large6
1098 large6-modified
1098 large6-modified
1099 $ rm sub/*.orig sub2/large8
1099 $ rm sub/*.orig sub2/large8
1100
1100
1101 revert some files to an older revision
1101 revert some files to an older revision
1102 $ hg revert --no-backup -r 8 sub2
1102 $ hg revert --no-backup -r 8 sub2
1103 reverting .hglf/sub2/large6 (glob)
1103 reverting .hglf/sub2/large6 (glob)
1104 $ cat sub2/large6
1104 $ cat sub2/large6
1105 large6
1105 large6
1106 $ hg revert --no-backup -C -r '.^' sub2
1106 $ hg revert --no-backup -C -r '.^' sub2
1107 reverting .hglf/sub2/large6 (glob)
1107 reverting .hglf/sub2/large6 (glob)
1108 $ hg revert --no-backup sub2
1108 $ hg revert --no-backup sub2
1109 reverting .hglf/sub2/large6 (glob)
1109 reverting .hglf/sub2/large6 (glob)
1110 $ hg status
1110 $ hg status
1111
1111
1112 "verify --large" actually verifies largefiles
1112 "verify --large" actually verifies largefiles
1113
1113
1114 $ hg verify --large
1114 $ hg verify --large
1115 checking changesets
1115 checking changesets
1116 checking manifests
1116 checking manifests
1117 crosschecking files in changesets and manifests
1117 crosschecking files in changesets and manifests
1118 checking files
1118 checking files
1119 10 files, 10 changesets, 28 total revisions
1119 10 files, 10 changesets, 28 total revisions
1120 searching 1 changesets for largefiles
1120 searching 1 changesets for largefiles
1121 verified existence of 3 revisions of 3 largefiles
1121 verified existence of 3 revisions of 3 largefiles
1122
1122
1123 Merging does not revert to old versions of largefiles and also check
1123 Merging does not revert to old versions of largefiles and also check
1124 that merging after having pulled from a non-default remote works
1124 that merging after having pulled from a non-default remote works
1125 correctly.
1125 correctly.
1126
1126
1127 $ cd ..
1127 $ cd ..
1128 $ hg clone -r 7 e temp
1128 $ hg clone -r 7 e temp
1129 adding changesets
1129 adding changesets
1130 adding manifests
1130 adding manifests
1131 adding file changes
1131 adding file changes
1132 added 8 changesets with 24 changes to 10 files
1132 added 8 changesets with 24 changes to 10 files
1133 updating to branch default
1133 updating to branch default
1134 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1134 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1135 getting changed largefiles
1135 getting changed largefiles
1136 3 largefiles updated, 0 removed
1136 3 largefiles updated, 0 removed
1137 $ hg clone temp f
1137 $ hg clone temp f
1138 updating to branch default
1138 updating to branch default
1139 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1139 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1140 getting changed largefiles
1140 getting changed largefiles
1141 3 largefiles updated, 0 removed
1141 3 largefiles updated, 0 removed
1142 # Delete the largefiles in the largefiles system cache so that we have an
1142 # Delete the largefiles in the largefiles system cache so that we have an
1143 # opportunity to test that caching after a pull works.
1143 # opportunity to test that caching after a pull works.
1144 $ rm "${USERCACHE}"/*
1144 $ rm "${USERCACHE}"/*
1145 $ cd f
1145 $ cd f
1146 $ echo "large4-merge-test" > sub/large4
1146 $ echo "large4-merge-test" > sub/large4
1147 $ hg commit -m "Modify large4 to test merge"
1147 $ hg commit -m "Modify large4 to test merge"
1148 Invoking status precommit hook
1148 Invoking status precommit hook
1149 M sub/large4
1149 M sub/large4
1150 $ hg pull ../e
1150 $ hg pull ../e
1151 pulling from ../e
1151 pulling from ../e
1152 searching for changes
1152 searching for changes
1153 adding changesets
1153 adding changesets
1154 adding manifests
1154 adding manifests
1155 adding file changes
1155 adding file changes
1156 added 2 changesets with 4 changes to 4 files (+1 heads)
1156 added 2 changesets with 4 changes to 4 files (+1 heads)
1157 (run 'hg heads' to see heads, 'hg merge' to merge)
1157 (run 'hg heads' to see heads, 'hg merge' to merge)
1158 caching new largefiles
1158 caching new largefiles
1159 2 largefiles cached
1159 2 largefiles cached
1160 $ hg merge
1160 $ hg merge
1161 merging sub/large4
1161 merging sub/large4
1162 largefile sub/large4 has a merge conflict
1162 largefile sub/large4 has a merge conflict
1163 keep (l)ocal or take (o)ther? l
1163 keep (l)ocal or take (o)ther? l
1164 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
1164 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
1165 (branch merge, don't forget to commit)
1165 (branch merge, don't forget to commit)
1166 getting changed largefiles
1166 getting changed largefiles
1167 1 largefiles updated, 0 removed
1167 1 largefiles updated, 0 removed
1168 $ hg commit -m "Merge repos e and f"
1168 $ hg commit -m "Merge repos e and f"
1169 Invoking status precommit hook
1169 Invoking status precommit hook
1170 M normal3
1170 M normal3
1171 M sub/normal4
1171 M sub/normal4
1172 M sub2/large6
1172 M sub2/large6
1173 $ cat normal3
1173 $ cat normal3
1174 normal3-modified
1174 normal3-modified
1175 $ cat sub/normal4
1175 $ cat sub/normal4
1176 normal4-modified
1176 normal4-modified
1177 $ cat sub/large4
1177 $ cat sub/large4
1178 large4-merge-test
1178 large4-merge-test
1179 $ cat sub2/large6
1179 $ cat sub2/large6
1180 large6-modified
1180 large6-modified
1181 $ cat sub2/large7
1181 $ cat sub2/large7
1182 large7
1182 large7
1183
1183
1184 Test status after merging with a branch that introduces a new largefile:
1184 Test status after merging with a branch that introduces a new largefile:
1185
1185
1186 $ echo large > large
1186 $ echo large > large
1187 $ hg add --large large
1187 $ hg add --large large
1188 $ hg commit -m 'add largefile'
1188 $ hg commit -m 'add largefile'
1189 Invoking status precommit hook
1189 Invoking status precommit hook
1190 A large
1190 A large
1191 $ hg update -q ".^"
1191 $ hg update -q ".^"
1192 $ echo change >> normal3
1192 $ echo change >> normal3
1193 $ hg commit -m 'some change'
1193 $ hg commit -m 'some change'
1194 Invoking status precommit hook
1194 Invoking status precommit hook
1195 M normal3
1195 M normal3
1196 created new head
1196 created new head
1197 $ hg merge
1197 $ hg merge
1198 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1198 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1199 (branch merge, don't forget to commit)
1199 (branch merge, don't forget to commit)
1200 getting changed largefiles
1200 getting changed largefiles
1201 1 largefiles updated, 0 removed
1201 1 largefiles updated, 0 removed
1202 $ hg status
1202 $ hg status
1203 M large
1203 M large
1204
1204
1205 Test that a normal file and a largefile with the same name and path cannot
1205 Test that a normal file and a largefile with the same name and path cannot
1206 coexist.
1206 coexist.
1207
1207
1208 $ rm sub2/large7
1208 $ rm sub2/large7
1209 $ echo "largeasnormal" > sub2/large7
1209 $ echo "largeasnormal" > sub2/large7
1210 $ hg add sub2/large7
1210 $ hg add sub2/large7
1211 sub2/large7 already a largefile
1211 sub2/large7 already a largefile
1212
1212
1213 Test that transplanting a largefile change works correctly.
1213 Test that transplanting a largefile change works correctly.
1214
1214
1215 $ cd ..
1215 $ cd ..
1216 $ hg clone -r 8 d g
1216 $ hg clone -r 8 d g
1217 adding changesets
1217 adding changesets
1218 adding manifests
1218 adding manifests
1219 adding file changes
1219 adding file changes
1220 added 9 changesets with 26 changes to 10 files
1220 added 9 changesets with 26 changes to 10 files
1221 updating to branch default
1221 updating to branch default
1222 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1222 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1223 getting changed largefiles
1223 getting changed largefiles
1224 3 largefiles updated, 0 removed
1224 3 largefiles updated, 0 removed
1225 $ cd g
1225 $ cd g
1226 $ hg transplant -s ../d 598410d3eb9a
1226 $ hg transplant -s ../d 598410d3eb9a
1227 searching for changes
1227 searching for changes
1228 searching for changes
1228 searching for changes
1229 adding changesets
1229 adding changesets
1230 adding manifests
1230 adding manifests
1231 adding file changes
1231 adding file changes
1232 added 1 changesets with 2 changes to 2 files
1232 added 1 changesets with 2 changes to 2 files
1233 getting changed largefiles
1233 getting changed largefiles
1234 1 largefiles updated, 0 removed
1234 1 largefiles updated, 0 removed
1235 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1235 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1236 9:598410d3eb9a modify normal file largefile in repo d
1236 9:598410d3eb9a modify normal file largefile in repo d
1237 8:a381d2c8c80e modify normal file and largefile in repo b
1237 8:a381d2c8c80e modify normal file and largefile in repo b
1238 7:daea875e9014 add/edit more largefiles
1238 7:daea875e9014 add/edit more largefiles
1239 6:4355d653f84f edit files yet again
1239 6:4355d653f84f edit files yet again
1240 5:9d5af5072dbd edit files again
1240 5:9d5af5072dbd edit files again
1241 4:74c02385b94c move files
1241 4:74c02385b94c move files
1242 3:9e8fbc4bce62 copy files
1242 3:9e8fbc4bce62 copy files
1243 2:51a0ae4d5864 remove files
1243 2:51a0ae4d5864 remove files
1244 1:ce8896473775 edit files
1244 1:ce8896473775 edit files
1245 0:30d30fe6a5be add files
1245 0:30d30fe6a5be add files
1246 $ cat normal3
1246 $ cat normal3
1247 normal3-modified
1247 normal3-modified
1248 $ cat sub/normal4
1248 $ cat sub/normal4
1249 normal4-modified
1249 normal4-modified
1250 $ cat sub/large4
1250 $ cat sub/large4
1251 large4-modified
1251 large4-modified
1252 $ cat sub2/large6
1252 $ cat sub2/large6
1253 large6-modified
1253 large6-modified
1254 $ cat sub2/large7
1254 $ cat sub2/large7
1255 large7
1255 large7
1256
1256
1257 Cat a largefile
1257 Cat a largefile
1258 $ hg cat normal3
1258 $ hg cat normal3
1259 normal3-modified
1259 normal3-modified
1260 $ hg cat sub/large4
1260 $ hg cat sub/large4
1261 large4-modified
1261 large4-modified
1262 $ rm "${USERCACHE}"/*
1262 $ rm "${USERCACHE}"/*
1263 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
1263 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
1264 $ cat cat.out
1264 $ cat cat.out
1265 large4-modified
1265 large4-modified
1266 $ rm cat.out
1266 $ rm cat.out
1267 $ hg cat -r a381d2c8c80e normal3
1267 $ hg cat -r a381d2c8c80e normal3
1268 normal3-modified
1268 normal3-modified
1269 $ hg cat -r '.^' normal3
1269 $ hg cat -r '.^' normal3
1270 normal3-modified
1270 normal3-modified
1271 $ hg cat -r '.^' sub/large4
1271 $ hg cat -r '.^' sub/large4
1272 large4-modified
1272 large4-modified
1273
1273
1274 Test that renaming a largefile results in correct output for status
1274 Test that renaming a largefile results in correct output for status
1275
1275
1276 $ hg rename sub/large4 large4-renamed
1276 $ hg rename sub/large4 large4-renamed
1277 $ hg commit -m "test rename output"
1277 $ hg commit -m "test rename output"
1278 Invoking status precommit hook
1278 Invoking status precommit hook
1279 A large4-renamed
1279 A large4-renamed
1280 R sub/large4
1280 R sub/large4
1281 $ cat large4-renamed
1281 $ cat large4-renamed
1282 large4-modified
1282 large4-modified
1283 $ cd sub2
1283 $ cd sub2
1284 $ hg rename large6 large6-renamed
1284 $ hg rename large6 large6-renamed
1285 $ hg st
1285 $ hg st
1286 A sub2/large6-renamed
1286 A sub2/large6-renamed
1287 R sub2/large6
1287 R sub2/large6
1288 $ cd ..
1288 $ cd ..
1289
1289
1290 Test --normal flag
1290 Test --normal flag
1291
1291
1292 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
1292 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
1293 $ hg add --normal --large new-largefile
1293 $ hg add --normal --large new-largefile
1294 abort: --normal cannot be used with --large
1294 abort: --normal cannot be used with --large
1295 [255]
1295 [255]
1296 $ hg add --normal new-largefile
1296 $ hg add --normal new-largefile
1297 new-largefile: up to 69 MB of RAM may be required to manage this file
1297 new-largefile: up to 69 MB of RAM may be required to manage this file
1298 (use 'hg revert new-largefile' to cancel the pending addition)
1298 (use 'hg revert new-largefile' to cancel the pending addition)
1299 $ cd ..
1299 $ cd ..
1300
1300
1301 #if serve
1301 #if serve
1302 vanilla clients not locked out from largefiles servers on vanilla repos
1302 vanilla clients not locked out from largefiles servers on vanilla repos
1303 $ mkdir r1
1303 $ mkdir r1
1304 $ cd r1
1304 $ cd r1
1305 $ hg init
1305 $ hg init
1306 $ echo c1 > f1
1306 $ echo c1 > f1
1307 $ hg add f1
1307 $ hg add f1
1308 $ hg commit -m "m1"
1308 $ hg commit -m "m1"
1309 Invoking status precommit hook
1309 Invoking status precommit hook
1310 A f1
1310 A f1
1311 $ cd ..
1311 $ cd ..
1312 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
1312 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
1313 $ cat hg.pid >> $DAEMON_PIDS
1313 $ cat hg.pid >> $DAEMON_PIDS
1314 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
1314 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
1315 requesting all changes
1315 requesting all changes
1316 adding changesets
1316 adding changesets
1317 adding manifests
1317 adding manifests
1318 adding file changes
1318 adding file changes
1319 added 1 changesets with 1 changes to 1 files
1319 added 1 changesets with 1 changes to 1 files
1320 updating to branch default
1320 updating to branch default
1321 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1321 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1322
1322
1323 largefiles clients still work with vanilla servers
1323 largefiles clients still work with vanilla servers
1324 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
1324 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
1325 $ cat hg.pid >> $DAEMON_PIDS
1325 $ cat hg.pid >> $DAEMON_PIDS
1326 $ hg clone http://localhost:$HGPORT1 r3
1326 $ hg clone http://localhost:$HGPORT1 r3
1327 requesting all changes
1327 requesting all changes
1328 adding changesets
1328 adding changesets
1329 adding manifests
1329 adding manifests
1330 adding file changes
1330 adding file changes
1331 added 1 changesets with 1 changes to 1 files
1331 added 1 changesets with 1 changes to 1 files
1332 updating to branch default
1332 updating to branch default
1333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1333 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 #endif
1334 #endif
1335
1335
1336
1336
1337 vanilla clients locked out from largefiles http repos
1337 vanilla clients locked out from largefiles http repos
1338 $ mkdir r4
1338 $ mkdir r4
1339 $ cd r4
1339 $ cd r4
1340 $ hg init
1340 $ hg init
1341 $ echo c1 > f1
1341 $ echo c1 > f1
1342 $ hg add --large f1
1342 $ hg add --large f1
1343 $ hg commit -m "m1"
1343 $ hg commit -m "m1"
1344 Invoking status precommit hook
1344 Invoking status precommit hook
1345 A f1
1345 A f1
1346 $ cd ..
1346 $ cd ..
1347
1347
1348 largefiles can be pushed locally (issue3583)
1348 largefiles can be pushed locally (issue3583)
1349 $ hg init dest
1349 $ hg init dest
1350 $ cd r4
1350 $ cd r4
1351 $ hg outgoing ../dest
1351 $ hg outgoing ../dest
1352 comparing with ../dest
1352 comparing with ../dest
1353 searching for changes
1353 searching for changes
1354 changeset: 0:639881c12b4c
1354 changeset: 0:639881c12b4c
1355 tag: tip
1355 tag: tip
1356 user: test
1356 user: test
1357 date: Thu Jan 01 00:00:00 1970 +0000
1357 date: Thu Jan 01 00:00:00 1970 +0000
1358 summary: m1
1358 summary: m1
1359
1359
1360 $ hg push ../dest
1360 $ hg push ../dest
1361 pushing to ../dest
1361 pushing to ../dest
1362 searching for changes
1362 searching for changes
1363 searching for changes
1363 searching for changes
1364 adding changesets
1364 adding changesets
1365 adding manifests
1365 adding manifests
1366 adding file changes
1366 adding file changes
1367 added 1 changesets with 1 changes to 1 files
1367 added 1 changesets with 1 changes to 1 files
1368
1368
1369 exit code with nothing outgoing (issue3611)
1369 exit code with nothing outgoing (issue3611)
1370 $ hg outgoing ../dest
1370 $ hg outgoing ../dest
1371 comparing with ../dest
1371 comparing with ../dest
1372 searching for changes
1372 searching for changes
1373 no changes found
1373 no changes found
1374 [1]
1374 [1]
1375 $ cd ..
1375 $ cd ..
1376
1376
1377 #if serve
1377 #if serve
1378 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
1378 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
1379 $ cat hg.pid >> $DAEMON_PIDS
1379 $ cat hg.pid >> $DAEMON_PIDS
1380 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
1380 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
1381 abort: remote error:
1381 abort: remote error:
1382
1382
1383 This repository uses the largefiles extension.
1383 This repository uses the largefiles extension.
1384
1384
1385 Please enable it in your Mercurial config file.
1385 Please enable it in your Mercurial config file.
1386 [255]
1386 [255]
1387
1387
1388 used all HGPORTs, kill all daemons
1388 used all HGPORTs, kill all daemons
1389 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1389 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1390 #endif
1390 #endif
1391
1391
1392 vanilla clients locked out from largefiles ssh repos
1392 vanilla clients locked out from largefiles ssh repos
1393 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
1393 $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
1394 abort: remote error:
1394 abort: remote error:
1395
1395
1396 This repository uses the largefiles extension.
1396 This repository uses the largefiles extension.
1397
1397
1398 Please enable it in your Mercurial config file.
1398 Please enable it in your Mercurial config file.
1399 [255]
1399 [255]
1400
1400
1401 #if serve
1401 #if serve
1402
1402
1403 largefiles clients refuse to push largefiles repos to vanilla servers
1403 largefiles clients refuse to push largefiles repos to vanilla servers
1404 $ mkdir r6
1404 $ mkdir r6
1405 $ cd r6
1405 $ cd r6
1406 $ hg init
1406 $ hg init
1407 $ echo c1 > f1
1407 $ echo c1 > f1
1408 $ hg add f1
1408 $ hg add f1
1409 $ hg commit -m "m1"
1409 $ hg commit -m "m1"
1410 Invoking status precommit hook
1410 Invoking status precommit hook
1411 A f1
1411 A f1
1412 $ cat >> .hg/hgrc <<!
1412 $ cat >> .hg/hgrc <<!
1413 > [web]
1413 > [web]
1414 > push_ssl = false
1414 > push_ssl = false
1415 > allow_push = *
1415 > allow_push = *
1416 > !
1416 > !
1417 $ cd ..
1417 $ cd ..
1418 $ hg clone r6 r7
1418 $ hg clone r6 r7
1419 updating to branch default
1419 updating to branch default
1420 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1420 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1421 $ cd r7
1421 $ cd r7
1422 $ echo c2 > f2
1422 $ echo c2 > f2
1423 $ hg add --large f2
1423 $ hg add --large f2
1424 $ hg commit -m "m2"
1424 $ hg commit -m "m2"
1425 Invoking status precommit hook
1425 Invoking status precommit hook
1426 A f2
1426 A f2
1427 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
1427 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
1428 $ cat ../hg.pid >> $DAEMON_PIDS
1428 $ cat ../hg.pid >> $DAEMON_PIDS
1429 $ hg push http://localhost:$HGPORT
1429 $ hg push http://localhost:$HGPORT
1430 pushing to http://localhost:$HGPORT/
1430 pushing to http://localhost:$HGPORT/
1431 searching for changes
1431 searching for changes
1432 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
1432 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
1433 [255]
1433 [255]
1434 $ cd ..
1434 $ cd ..
1435
1435
1436 putlfile errors are shown (issue3123)
1436 putlfile errors are shown (issue3123)
1437 Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat)
1437 Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat)
1438 $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8"
1438 $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8"
1439 $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
1439 $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
1440 $ hg init empty
1440 $ hg init empty
1441 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
1441 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
1442 > --config 'web.allow_push=*' --config web.push_ssl=False
1442 > --config 'web.allow_push=*' --config web.push_ssl=False
1443 $ cat hg.pid >> $DAEMON_PIDS
1443 $ cat hg.pid >> $DAEMON_PIDS
1444 $ hg push -R r7 http://localhost:$HGPORT1
1444 $ hg push -R r7 http://localhost:$HGPORT1
1445 pushing to http://localhost:$HGPORT1/
1445 pushing to http://localhost:$HGPORT1/
1446 searching for changes
1446 searching for changes
1447 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
1447 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
1448 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
1448 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
1449 [255]
1449 [255]
1450 $ rm -rf empty
1450 $ rm -rf empty
1451
1451
1452 Push a largefiles repository to a served empty repository
1452 Push a largefiles repository to a served empty repository
1453 $ hg init r8
1453 $ hg init r8
1454 $ echo c3 > r8/f1
1454 $ echo c3 > r8/f1
1455 $ hg add --large r8/f1 -R r8
1455 $ hg add --large r8/f1 -R r8
1456 $ hg commit -m "m1" -R r8
1456 $ hg commit -m "m1" -R r8
1457 Invoking status precommit hook
1457 Invoking status precommit hook
1458 A f1
1458 A f1
1459 $ hg init empty
1459 $ hg init empty
1460 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1460 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
1461 > --config 'web.allow_push=*' --config web.push_ssl=False
1461 > --config 'web.allow_push=*' --config web.push_ssl=False
1462 $ cat hg.pid >> $DAEMON_PIDS
1462 $ cat hg.pid >> $DAEMON_PIDS
1463 $ rm "${USERCACHE}"/*
1463 $ rm "${USERCACHE}"/*
1464 $ hg push -R r8 http://localhost:$HGPORT2
1464 $ hg push -R r8 http://localhost:$HGPORT2
1465 pushing to http://localhost:$HGPORT2/
1465 pushing to http://localhost:$HGPORT2/
1466 searching for changes
1466 searching for changes
1467 searching for changes
1467 searching for changes
1468 remote: adding changesets
1468 remote: adding changesets
1469 remote: adding manifests
1469 remote: adding manifests
1470 remote: adding file changes
1470 remote: adding file changes
1471 remote: added 1 changesets with 1 changes to 1 files
1471 remote: added 1 changesets with 1 changes to 1 files
1472
1472
1473 Clone over http, with largefiles being pulled on update, not on clone.
1473 Clone over http, with largefiles being pulled on update, not on clone.
1474
1474
1475 $ hg clone -q http://localhost:$HGPORT2/ http-clone -U
1475 $ hg clone -q http://localhost:$HGPORT2/ http-clone -U
1476
1476
1477 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache
1477 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache
1478 resolving manifests
1478 resolving manifests
1479 overwrite: False, partial: False
1479 overwrite: False, partial: False
1480 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
1480 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
1481 .hglf/f1: remote created -> g
1481 .hglf/f1: remote created -> g
1482 updating: .hglf/f1 1/1 files (100.00%)
1482 updating: .hglf/f1 1/1 files (100.00%)
1483 getting .hglf/f1
1483 getting .hglf/f1
1484 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1484 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1485 getting changed largefiles
1485 getting changed largefiles
1486 using http://localhost:$HGPORT2/
1486 using http://localhost:$HGPORT2/
1487 sending capabilities command
1487 sending capabilities command
1488 getting largefiles: 0/1 lfile (0.00%)
1488 getting largefiles: 0/1 lfile (0.00%)
1489 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
1489 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
1490 sending batch command
1490 sending batch command
1491 sending getlfile command
1491 sending getlfile command
1492 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
1492 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
1493 1 largefiles updated, 0 removed
1493 1 largefiles updated, 0 removed
1494
1494
1495 $ ls http-clone-usercache/*
1495 $ ls http-clone-usercache/*
1496 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
1496 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
1497
1497
1498 $ rm -rf empty http-clone http-clone-usercache
1498 $ rm -rf empty http-clone http-clone-usercache
1499
1499
1500 used all HGPORTs, kill all daemons
1500 used all HGPORTs, kill all daemons
1501 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1501 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
1502
1502
1503 #endif
1503 #endif
1504
1504
1505
1505
1506 #if unix-permissions
1506 #if unix-permissions
1507
1507
1508 Clone a local repository owned by another user
1508 Clone a local repository owned by another user
1509 We have to simulate that here by setting $HOME and removing write permissions
1509 We have to simulate that here by setting $HOME and removing write permissions
1510 $ ORIGHOME="$HOME"
1510 $ ORIGHOME="$HOME"
1511 $ mkdir alice
1511 $ mkdir alice
1512 $ HOME="`pwd`/alice"
1512 $ HOME="`pwd`/alice"
1513 $ cd alice
1513 $ cd alice
1514 $ hg init pubrepo
1514 $ hg init pubrepo
1515 $ cd pubrepo
1515 $ cd pubrepo
1516 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1516 $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
1517 $ hg add --large a-large-file
1517 $ hg add --large a-large-file
1518 $ hg commit -m "Add a large file"
1518 $ hg commit -m "Add a large file"
1519 Invoking status precommit hook
1519 Invoking status precommit hook
1520 A a-large-file
1520 A a-large-file
1521 $ cd ..
1521 $ cd ..
1522 $ chmod -R a-w pubrepo
1522 $ chmod -R a-w pubrepo
1523 $ cd ..
1523 $ cd ..
1524 $ mkdir bob
1524 $ mkdir bob
1525 $ HOME="`pwd`/bob"
1525 $ HOME="`pwd`/bob"
1526 $ cd bob
1526 $ cd bob
1527 $ hg clone --pull ../alice/pubrepo pubrepo
1527 $ hg clone --pull ../alice/pubrepo pubrepo
1528 requesting all changes
1528 requesting all changes
1529 adding changesets
1529 adding changesets
1530 adding manifests
1530 adding manifests
1531 adding file changes
1531 adding file changes
1532 added 1 changesets with 1 changes to 1 files
1532 added 1 changesets with 1 changes to 1 files
1533 updating to branch default
1533 updating to branch default
1534 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1534 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1535 getting changed largefiles
1535 getting changed largefiles
1536 1 largefiles updated, 0 removed
1536 1 largefiles updated, 0 removed
1537 $ cd ..
1537 $ cd ..
1538 $ chmod -R u+w alice/pubrepo
1538 $ chmod -R u+w alice/pubrepo
1539 $ HOME="$ORIGHOME"
1539 $ HOME="$ORIGHOME"
1540
1540
1541 #endif
1541 #endif
1542
1542
1543 #if symlink
1543 #if symlink
1544
1544
1545 Symlink to a large largefile should behave the same as a symlink to a normal file
1545 Symlink to a large largefile should behave the same as a symlink to a normal file
1546 $ hg init largesymlink
1546 $ hg init largesymlink
1547 $ cd largesymlink
1547 $ cd largesymlink
1548 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1548 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
1549 $ hg add --large largefile
1549 $ hg add --large largefile
1550 $ hg commit -m "commit a large file"
1550 $ hg commit -m "commit a large file"
1551 Invoking status precommit hook
1551 Invoking status precommit hook
1552 A largefile
1552 A largefile
1553 $ ln -s largefile largelink
1553 $ ln -s largefile largelink
1554 $ hg add largelink
1554 $ hg add largelink
1555 $ hg commit -m "commit a large symlink"
1555 $ hg commit -m "commit a large symlink"
1556 Invoking status precommit hook
1556 Invoking status precommit hook
1557 A largelink
1557 A largelink
1558 $ rm -f largelink
1558 $ rm -f largelink
1559 $ hg up >/dev/null
1559 $ hg up >/dev/null
1560 $ test -f largelink
1560 $ test -f largelink
1561 [1]
1561 [1]
1562 $ test -L largelink
1562 $ test -L largelink
1563 [1]
1563 [1]
1564 $ rm -f largelink # make next part of the test independent of the previous
1564 $ rm -f largelink # make next part of the test independent of the previous
1565 $ hg up -C >/dev/null
1565 $ hg up -C >/dev/null
1566 $ test -f largelink
1566 $ test -f largelink
1567 $ test -L largelink
1567 $ test -L largelink
1568 $ cd ..
1568 $ cd ..
1569
1569
1570 #endif
1570 #endif
1571
1571
1572 test for pattern matching on 'hg status':
1572 test for pattern matching on 'hg status':
1573 to boost performance, largefiles checks whether specified patterns are
1573 to boost performance, largefiles checks whether specified patterns are
1574 related to largefiles in working directory (NOT to STANDIN) or not.
1574 related to largefiles in working directory (NOT to STANDIN) or not.
1575
1575
1576 $ hg init statusmatch
1576 $ hg init statusmatch
1577 $ cd statusmatch
1577 $ cd statusmatch
1578
1578
1579 $ mkdir -p a/b/c/d
1579 $ mkdir -p a/b/c/d
1580 $ echo normal > a/b/c/d/e.normal.txt
1580 $ echo normal > a/b/c/d/e.normal.txt
1581 $ hg add a/b/c/d/e.normal.txt
1581 $ hg add a/b/c/d/e.normal.txt
1582 $ echo large > a/b/c/d/e.large.txt
1582 $ echo large > a/b/c/d/e.large.txt
1583 $ hg add --large a/b/c/d/e.large.txt
1583 $ hg add --large a/b/c/d/e.large.txt
1584 $ mkdir -p a/b/c/x
1584 $ mkdir -p a/b/c/x
1585 $ echo normal > a/b/c/x/y.normal.txt
1585 $ echo normal > a/b/c/x/y.normal.txt
1586 $ hg add a/b/c/x/y.normal.txt
1586 $ hg add a/b/c/x/y.normal.txt
1587 $ hg commit -m 'add files'
1587 $ hg commit -m 'add files'
1588 Invoking status precommit hook
1588 Invoking status precommit hook
1589 A a/b/c/d/e.large.txt
1589 A a/b/c/d/e.large.txt
1590 A a/b/c/d/e.normal.txt
1590 A a/b/c/d/e.normal.txt
1591 A a/b/c/x/y.normal.txt
1591 A a/b/c/x/y.normal.txt
1592
1592
1593 (1) no pattern: no performance boost
1593 (1) no pattern: no performance boost
1594 $ hg status -A
1594 $ hg status -A
1595 C a/b/c/d/e.large.txt
1595 C a/b/c/d/e.large.txt
1596 C a/b/c/d/e.normal.txt
1596 C a/b/c/d/e.normal.txt
1597 C a/b/c/x/y.normal.txt
1597 C a/b/c/x/y.normal.txt
1598
1598
1599 (2) pattern not related to largefiles: performance boost
1599 (2) pattern not related to largefiles: performance boost
1600 $ hg status -A a/b/c/x
1600 $ hg status -A a/b/c/x
1601 C a/b/c/x/y.normal.txt
1601 C a/b/c/x/y.normal.txt
1602
1602
1603 (3) pattern related to largefiles: no performance boost
1603 (3) pattern related to largefiles: no performance boost
1604 $ hg status -A a/b/c/d
1604 $ hg status -A a/b/c/d
1605 C a/b/c/d/e.large.txt
1605 C a/b/c/d/e.large.txt
1606 C a/b/c/d/e.normal.txt
1606 C a/b/c/d/e.normal.txt
1607
1607
1608 (4) pattern related to STANDIN (not to largefiles): performance boost
1608 (4) pattern related to STANDIN (not to largefiles): performance boost
1609 $ hg status -A .hglf/a
1609 $ hg status -A .hglf/a
1610 C .hglf/a/b/c/d/e.large.txt
1610 C .hglf/a/b/c/d/e.large.txt
1611
1611
1612 (5) mixed case: no performance boost
1612 (5) mixed case: no performance boost
1613 $ hg status -A a/b/c/x a/b/c/d
1613 $ hg status -A a/b/c/x a/b/c/d
1614 C a/b/c/d/e.large.txt
1614 C a/b/c/d/e.large.txt
1615 C a/b/c/d/e.normal.txt
1615 C a/b/c/d/e.normal.txt
1616 C a/b/c/x/y.normal.txt
1616 C a/b/c/x/y.normal.txt
1617
1617
1618 verify that largefiles doesn't break filesets
1618 verify that largefiles doesn't break filesets
1619
1619
1620 $ hg log --rev . --exclude "set:binary()"
1620 $ hg log --rev . --exclude "set:binary()"
1621 changeset: 0:41bd42f10efa
1621 changeset: 0:41bd42f10efa
1622 tag: tip
1622 tag: tip
1623 user: test
1623 user: test
1624 date: Thu Jan 01 00:00:00 1970 +0000
1624 date: Thu Jan 01 00:00:00 1970 +0000
1625 summary: add files
1625 summary: add files
1626
1626
1627 verify that large files in subrepos handled properly
1627 verify that large files in subrepos handled properly
1628 $ hg init subrepo
1628 $ hg init subrepo
1629 $ echo "subrepo = subrepo" > .hgsub
1629 $ echo "subrepo = subrepo" > .hgsub
1630 $ hg add .hgsub
1630 $ hg add .hgsub
1631 $ hg ci -m "add subrepo"
1631 $ hg ci -m "add subrepo"
1632 Invoking status precommit hook
1632 Invoking status precommit hook
1633 A .hgsub
1633 A .hgsub
1634 ? .hgsubstate
1634 ? .hgsubstate
1635 $ echo "rev 1" > subrepo/large.txt
1635 $ echo "rev 1" > subrepo/large.txt
1636 $ hg -R subrepo add --large subrepo/large.txt
1636 $ hg -R subrepo add --large subrepo/large.txt
1637 $ hg sum
1637 $ hg sum
1638 parent: 1:8ee150ea2e9c tip
1638 parent: 1:8ee150ea2e9c tip
1639 add subrepo
1639 add subrepo
1640 branch: default
1640 branch: default
1641 commit: 1 subrepos
1641 commit: 1 subrepos
1642 update: (current)
1642 update: (current)
1643 $ hg st
1643 $ hg st
1644 $ hg st -S
1644 $ hg st -S
1645 A subrepo/large.txt
1645 A subrepo/large.txt
1646 $ hg ci -S -m "commit top repo"
1646 $ hg ci -S -m "commit top repo"
1647 committing subrepository subrepo
1647 committing subrepository subrepo
1648 Invoking status precommit hook
1648 Invoking status precommit hook
1649 A large.txt
1649 A large.txt
1650 Invoking status precommit hook
1650 Invoking status precommit hook
1651 M .hgsubstate
1651 M .hgsubstate
1652 # No differences
1652 # No differences
1653 $ hg st -S
1653 $ hg st -S
1654 $ hg sum
1654 $ hg sum
1655 parent: 2:ce4cd0c527a6 tip
1655 parent: 2:ce4cd0c527a6 tip
1656 commit top repo
1656 commit top repo
1657 branch: default
1657 branch: default
1658 commit: (clean)
1658 commit: (clean)
1659 update: (current)
1659 update: (current)
1660 $ echo "rev 2" > subrepo/large.txt
1660 $ echo "rev 2" > subrepo/large.txt
1661 $ hg st -S
1661 $ hg st -S
1662 M subrepo/large.txt
1662 M subrepo/large.txt
1663 $ hg sum
1663 $ hg sum
1664 parent: 2:ce4cd0c527a6 tip
1664 parent: 2:ce4cd0c527a6 tip
1665 commit top repo
1665 commit top repo
1666 branch: default
1666 branch: default
1667 commit: 1 subrepos
1667 commit: 1 subrepos
1668 update: (current)
1668 update: (current)
1669 $ hg ci -m "this commit should fail without -S"
1669 $ hg ci -m "this commit should fail without -S"
1670 abort: uncommitted changes in subrepo subrepo
1670 abort: uncommitted changes in subrepo subrepo
1671 (use --subrepos for recursive commit)
1671 (use --subrepos for recursive commit)
1672 [255]
1672 [255]
1673
1673
1674 Add a normal file to the subrepo, then test archiving
1674 Add a normal file to the subrepo, then test archiving
1675
1675
1676 $ echo 'normal file' > subrepo/normal.txt
1676 $ echo 'normal file' > subrepo/normal.txt
1677 $ hg -R subrepo add subrepo/normal.txt
1677 $ hg -R subrepo add subrepo/normal.txt
1678
1678
1679 Lock in subrepo, otherwise the change isn't archived
1679 Lock in subrepo, otherwise the change isn't archived
1680
1680
1681 $ hg ci -S -m "add normal file to top level"
1681 $ hg ci -S -m "add normal file to top level"
1682 committing subrepository subrepo
1682 committing subrepository subrepo
1683 Invoking status precommit hook
1683 Invoking status precommit hook
1684 M large.txt
1684 M large.txt
1685 A normal.txt
1685 A normal.txt
1686 Invoking status precommit hook
1686 Invoking status precommit hook
1687 M .hgsubstate
1687 M .hgsubstate
1688 $ hg archive -S lf_subrepo_archive
1688 $ hg archive -S lf_subrepo_archive
1689 $ find lf_subrepo_archive | sort
1689 $ find lf_subrepo_archive | sort
1690 lf_subrepo_archive
1690 lf_subrepo_archive
1691 lf_subrepo_archive/.hg_archival.txt
1691 lf_subrepo_archive/.hg_archival.txt
1692 lf_subrepo_archive/.hgsub
1692 lf_subrepo_archive/.hgsub
1693 lf_subrepo_archive/.hgsubstate
1693 lf_subrepo_archive/.hgsubstate
1694 lf_subrepo_archive/a
1694 lf_subrepo_archive/a
1695 lf_subrepo_archive/a/b
1695 lf_subrepo_archive/a/b
1696 lf_subrepo_archive/a/b/c
1696 lf_subrepo_archive/a/b/c
1697 lf_subrepo_archive/a/b/c/d
1697 lf_subrepo_archive/a/b/c/d
1698 lf_subrepo_archive/a/b/c/d/e.large.txt
1698 lf_subrepo_archive/a/b/c/d/e.large.txt
1699 lf_subrepo_archive/a/b/c/d/e.normal.txt
1699 lf_subrepo_archive/a/b/c/d/e.normal.txt
1700 lf_subrepo_archive/a/b/c/x
1700 lf_subrepo_archive/a/b/c/x
1701 lf_subrepo_archive/a/b/c/x/y.normal.txt
1701 lf_subrepo_archive/a/b/c/x/y.normal.txt
1702 lf_subrepo_archive/subrepo
1702 lf_subrepo_archive/subrepo
1703 lf_subrepo_archive/subrepo/large.txt
1703 lf_subrepo_archive/subrepo/large.txt
1704 lf_subrepo_archive/subrepo/normal.txt
1704 lf_subrepo_archive/subrepo/normal.txt
1705
1705
1706 Test archiving a revision that references a subrepo that is not yet
1706 Test archiving a revision that references a subrepo that is not yet
1707 cloned (see test-subrepo-recursion.t):
1707 cloned (see test-subrepo-recursion.t):
1708
1708
1709 $ hg clone -U . ../empty
1709 $ hg clone -U . ../empty
1710 $ cd ../empty
1710 $ cd ../empty
1711 $ hg archive --subrepos -r tip ../archive.tar.gz
1711 $ hg archive --subrepos -r tip ../archive.tar.gz
1712 cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo
1712 cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo
1713 $ cd ..
1713 $ cd ..
1714
1714
1715 Test that addremove picks up largefiles prior to the initial commit (issue3541)
1715 Test that addremove picks up largefiles prior to the initial commit (issue3541)
1716
1716
1717 $ hg init addrm2
1717 $ hg init addrm2
1718 $ cd addrm2
1718 $ cd addrm2
1719 $ touch large.dat
1719 $ touch large.dat
1720 $ touch large2.dat
1720 $ touch large2.dat
1721 $ touch normal
1721 $ touch normal
1722 $ hg add --large large.dat
1722 $ hg add --large large.dat
1723 $ hg addremove -v
1723 $ hg addremove -v
1724 adding large2.dat as a largefile
1724 adding large2.dat as a largefile
1725 adding normal
1725 adding normal
1726
1726
1727 Test that forgetting all largefiles reverts to islfilesrepo() == False
1727 Test that forgetting all largefiles reverts to islfilesrepo() == False
1728 (addremove will add *.dat as normal files now)
1728 (addremove will add *.dat as normal files now)
1729 $ hg forget large.dat
1729 $ hg forget large.dat
1730 $ hg forget large2.dat
1730 $ hg forget large2.dat
1731 $ hg addremove -v
1731 $ hg addremove -v
1732 adding large.dat
1732 adding large.dat
1733 adding large2.dat
1733 adding large2.dat
1734
1734
1735 Test commit's addremove option prior to the first commit
1735 Test commit's addremove option prior to the first commit
1736 $ hg forget large.dat
1736 $ hg forget large.dat
1737 $ hg forget large2.dat
1737 $ hg forget large2.dat
1738 $ hg add --large large.dat
1738 $ hg add --large large.dat
1739 $ hg ci -Am "commit"
1739 $ hg ci -Am "commit"
1740 adding large2.dat as a largefile
1740 adding large2.dat as a largefile
1741 Invoking status precommit hook
1741 Invoking status precommit hook
1742 A large.dat
1742 A large.dat
1743 A large2.dat
1743 A large2.dat
1744 A normal
1744 A normal
1745 $ find .hglf | sort
1745 $ find .hglf | sort
1746 .hglf
1746 .hglf
1747 .hglf/large.dat
1747 .hglf/large.dat
1748 .hglf/large2.dat
1748 .hglf/large2.dat
1749
1749
1750 $ cd ..
1750 $ cd ..
1751
1751
1752 issue3651: summary/outgoing with largefiles shows "no remote repo"
1752 issue3651: summary/outgoing with largefiles shows "no remote repo"
1753 unexpectedly
1753 unexpectedly
1754
1754
1755 $ mkdir issue3651
1755 $ mkdir issue3651
1756 $ cd issue3651
1756 $ cd issue3651
1757
1757
1758 $ hg init src
1758 $ hg init src
1759 $ echo a > src/a
1759 $ echo a > src/a
1760 $ hg -R src add --large src/a
1760 $ hg -R src add --large src/a
1761 $ hg -R src commit -m '#0'
1761 $ hg -R src commit -m '#0'
1762 Invoking status precommit hook
1762 Invoking status precommit hook
1763 A a
1763 A a
1764
1764
1765 check messages when no remote repository is specified:
1765 check messages when no remote repository is specified:
1766 "no remote repo" route for "hg outgoing --large" is not tested here,
1766 "no remote repo" route for "hg outgoing --large" is not tested here,
1767 because it can't be reproduced easily.
1767 because it can't be reproduced easily.
1768
1768
1769 $ hg init clone1
1769 $ hg init clone1
1770 $ hg -R clone1 -q pull src
1770 $ hg -R clone1 -q pull src
1771 $ hg -R clone1 -q update
1771 $ hg -R clone1 -q update
1772 $ hg -R clone1 paths | grep default
1772 $ hg -R clone1 paths | grep default
1773 [1]
1773 [1]
1774
1774
1775 $ hg -R clone1 summary --large
1775 $ hg -R clone1 summary --large
1776 parent: 0:fc0bd45326d3 tip
1776 parent: 0:fc0bd45326d3 tip
1777 #0
1777 #0
1778 branch: default
1778 branch: default
1779 commit: (clean)
1779 commit: (clean)
1780 update: (current)
1780 update: (current)
1781 largefiles: (no remote repo)
1781 largefiles: (no remote repo)
1782
1782
1783 check messages when there is no files to upload:
1783 check messages when there is no files to upload:
1784
1784
1785 $ hg -q clone src clone2
1785 $ hg -q clone src clone2
1786 $ hg -R clone2 paths | grep default
1786 $ hg -R clone2 paths | grep default
1787 default = $TESTTMP/issue3651/src (glob)
1787 default = $TESTTMP/issue3651/src (glob)
1788
1788
1789 $ hg -R clone2 summary --large
1789 $ hg -R clone2 summary --large
1790 parent: 0:fc0bd45326d3 tip
1790 parent: 0:fc0bd45326d3 tip
1791 #0
1791 #0
1792 branch: default
1792 branch: default
1793 commit: (clean)
1793 commit: (clean)
1794 update: (current)
1794 update: (current)
1795 searching for changes
1795 searching for changes
1796 largefiles: (no files to upload)
1796 largefiles: (no files to upload)
1797 $ hg -R clone2 outgoing --large
1797 $ hg -R clone2 outgoing --large
1798 comparing with $TESTTMP/issue3651/src (glob)
1798 comparing with $TESTTMP/issue3651/src (glob)
1799 searching for changes
1799 searching for changes
1800 no changes found
1800 no changes found
1801 searching for changes
1801 searching for changes
1802 largefiles: no files to upload
1802 largefiles: no files to upload
1803 [1]
1803 [1]
1804
1804
1805 check messages when there are files to upload:
1805 check messages when there are files to upload:
1806
1806
1807 $ echo b > clone2/b
1807 $ echo b > clone2/b
1808 $ hg -R clone2 add --large clone2/b
1808 $ hg -R clone2 add --large clone2/b
1809 $ hg -R clone2 commit -m '#1'
1809 $ hg -R clone2 commit -m '#1'
1810 Invoking status precommit hook
1810 Invoking status precommit hook
1811 A b
1811 A b
1812 $ hg -R clone2 summary --large
1812 $ hg -R clone2 summary --large
1813 parent: 1:1acbe71ce432 tip
1813 parent: 1:1acbe71ce432 tip
1814 #1
1814 #1
1815 branch: default
1815 branch: default
1816 commit: (clean)
1816 commit: (clean)
1817 update: (current)
1817 update: (current)
1818 searching for changes
1818 searching for changes
1819 largefiles: 1 to upload
1819 largefiles: 1 to upload
1820 $ hg -R clone2 outgoing --large
1820 $ hg -R clone2 outgoing --large
1821 comparing with $TESTTMP/issue3651/src (glob)
1821 comparing with $TESTTMP/issue3651/src (glob)
1822 searching for changes
1822 searching for changes
1823 changeset: 1:1acbe71ce432
1823 changeset: 1:1acbe71ce432
1824 tag: tip
1824 tag: tip
1825 user: test
1825 user: test
1826 date: Thu Jan 01 00:00:00 1970 +0000
1826 date: Thu Jan 01 00:00:00 1970 +0000
1827 summary: #1
1827 summary: #1
1828
1828
1829 searching for changes
1829 searching for changes
1830 largefiles to upload:
1830 largefiles to upload:
1831 b
1831 b
1832
1832
1833
1833
1834 $ cd ..
1834 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now