##// END OF EJS Templates
test: using generaldelta in 'test-lfconvert.t'...
Pierre-Yves David -
r26915:d92993d6 default
parent child Browse files
Show More
@@ -1,393 +1,396 b''
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 > [format]
5 > usegeneraldelta=yes
4 > [extensions]
6 > [extensions]
5 > largefiles =
7 > largefiles =
6 > share =
8 > share =
7 > strip =
9 > strip =
8 > convert =
10 > convert =
9 > [largefiles]
11 > [largefiles]
10 > minsize = 0.5
12 > minsize = 0.5
11 > patterns = **.other
13 > patterns = **.other
12 > **.dat
14 > **.dat
13 > usercache=${USERCACHE}
15 > usercache=${USERCACHE}
14 > EOF
16 > EOF
15
17
16 "lfconvert" works
18 "lfconvert" works
17 $ hg init bigfile-repo
19 $ hg init bigfile-repo
18 $ cd bigfile-repo
20 $ cd bigfile-repo
19 $ cat >> .hg/hgrc <<EOF
21 $ cat >> .hg/hgrc <<EOF
20 > [extensions]
22 > [extensions]
21 > largefiles = !
23 > largefiles = !
22 > EOF
24 > EOF
23 $ mkdir sub
25 $ mkdir sub
24 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
26 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
25 $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
27 $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
26 $ echo normal > normal1
28 $ echo normal > normal1
27 $ echo alsonormal > sub/normal2
29 $ echo alsonormal > sub/normal2
28 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
30 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
29 $ hg addremove
31 $ hg addremove
30 adding large
32 adding large
31 adding large2
33 adding large2
32 adding normal1
34 adding normal1
33 adding sub/maybelarge.dat
35 adding sub/maybelarge.dat
34 adding sub/normal2
36 adding sub/normal2
35 $ hg commit -m"add large, normal1" large normal1
37 $ hg commit -m"add large, normal1" large normal1
36 $ hg commit -m"add sub/*" sub
38 $ hg commit -m"add sub/*" sub
37
39
38 Test tag parsing
40 Test tag parsing
39 $ cat >> .hgtags <<EOF
41 $ cat >> .hgtags <<EOF
40 > IncorrectlyFormattedTag!
42 > IncorrectlyFormattedTag!
41 > invalidhash sometag
43 > invalidhash sometag
42 > 0123456789abcdef anothertag
44 > 0123456789abcdef anothertag
43 > EOF
45 > EOF
44 $ hg add .hgtags
46 $ hg add .hgtags
45 $ hg commit -m"add large2" large2 .hgtags
47 $ hg commit -m"add large2" large2 .hgtags
46
48
47 Test link+rename largefile codepath
49 Test link+rename largefile codepath
48 $ [ -d .hg/largefiles ] && echo fail || echo pass
50 $ [ -d .hg/largefiles ] && echo fail || echo pass
49 pass
51 pass
50 $ cd ..
52 $ cd ..
51 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
53 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
52 initializing destination largefiles-repo
54 initializing destination largefiles-repo
53 skipping incorrectly formatted tag IncorrectlyFormattedTag!
55 skipping incorrectly formatted tag IncorrectlyFormattedTag!
54 skipping incorrectly formatted id invalidhash
56 skipping incorrectly formatted id invalidhash
55 no mapping for id 0123456789abcdef
57 no mapping for id 0123456789abcdef
56 #if symlink
58 #if symlink
57 $ hg --cwd bigfile-repo rename large2 large3
59 $ hg --cwd bigfile-repo rename large2 large3
58 $ ln -sf large bigfile-repo/large3
60 $ ln -sf large bigfile-repo/large3
59 $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3
61 $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3
60 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink
62 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink
61 initializing destination largefiles-repo-symlink
63 initializing destination largefiles-repo-symlink
62 skipping incorrectly formatted tag IncorrectlyFormattedTag!
64 skipping incorrectly formatted tag IncorrectlyFormattedTag!
63 skipping incorrectly formatted id invalidhash
65 skipping incorrectly formatted id invalidhash
64 no mapping for id 0123456789abcdef
66 no mapping for id 0123456789abcdef
65 abort: renamed/copied largefile large3 becomes symlink
67 abort: renamed/copied largefile large3 becomes symlink
66 [255]
68 [255]
67 #endif
69 #endif
68 $ cd bigfile-repo
70 $ cd bigfile-repo
69 $ hg strip --no-backup 2
71 $ hg strip --no-backup 2
70 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
71 $ cd ..
73 $ cd ..
72 $ rm -rf largefiles-repo largefiles-repo-symlink
74 $ rm -rf largefiles-repo largefiles-repo-symlink
73
75
74 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
76 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
75 initializing destination largefiles-repo
77 initializing destination largefiles-repo
76
78
77 "lfconvert" converts content correctly
79 "lfconvert" converts content correctly
78 $ cd largefiles-repo
80 $ cd largefiles-repo
79 $ hg up
81 $ hg up
80 getting changed largefiles
82 getting changed largefiles
81 2 largefiles updated, 0 removed
83 2 largefiles updated, 0 removed
82 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 $ hg locate
85 $ hg locate
84 .hglf/large
86 .hglf/large
85 .hglf/sub/maybelarge.dat
87 .hglf/sub/maybelarge.dat
86 normal1
88 normal1
87 sub/normal2
89 sub/normal2
88 $ cat normal1
90 $ cat normal1
89 normal
91 normal
90 $ cat sub/normal2
92 $ cat sub/normal2
91 alsonormal
93 alsonormal
92 $ md5sum.py large sub/maybelarge.dat
94 $ md5sum.py large sub/maybelarge.dat
93 ec87a838931d4d5d2e94a04644788a55 large
95 ec87a838931d4d5d2e94a04644788a55 large
94 1276481102f218c981e0324180bafd9f sub/maybelarge.dat
96 1276481102f218c981e0324180bafd9f sub/maybelarge.dat
95
97
96 "lfconvert" adds 'largefiles' to .hg/requires.
98 "lfconvert" adds 'largefiles' to .hg/requires.
97 $ cat .hg/requires
99 $ cat .hg/requires
98 dotencode
100 dotencode
99 fncache
101 fncache
102 generaldelta
100 largefiles
103 largefiles
101 revlogv1
104 revlogv1
102 store
105 store
103
106
104 "lfconvert" includes a newline at the end of the standin files.
107 "lfconvert" includes a newline at the end of the standin files.
105 $ cat .hglf/large .hglf/sub/maybelarge.dat
108 $ cat .hglf/large .hglf/sub/maybelarge.dat
106 2e000fa7e85759c7f4c254d4d9c33ef481e459a7
109 2e000fa7e85759c7f4c254d4d9c33ef481e459a7
107 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
110 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
108 $ cd ..
111 $ cd ..
109
112
110 add some changesets to rename/remove/merge
113 add some changesets to rename/remove/merge
111 $ cd bigfile-repo
114 $ cd bigfile-repo
112 $ hg mv -q sub stuff
115 $ hg mv -q sub stuff
113 $ hg commit -m"rename sub/ to stuff/"
116 $ hg commit -m"rename sub/ to stuff/"
114 $ hg update -q 1
117 $ hg update -q 1
115 $ echo blah >> normal3
118 $ echo blah >> normal3
116 $ echo blah >> sub/normal2
119 $ echo blah >> sub/normal2
117 $ echo blah >> sub/maybelarge.dat
120 $ echo blah >> sub/maybelarge.dat
118 $ md5sum.py sub/maybelarge.dat
121 $ md5sum.py sub/maybelarge.dat
119 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat
122 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat
120 $ hg commit -A -m"add normal3, modify sub/*"
123 $ hg commit -A -m"add normal3, modify sub/*"
121 adding normal3
124 adding normal3
122 created new head
125 created new head
123 $ hg rm large normal3
126 $ hg rm large normal3
124 $ hg commit -q -m"remove large, normal3"
127 $ hg commit -q -m"remove large, normal3"
125 $ hg merge
128 $ hg merge
126 merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat
129 merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat
127 merging sub/normal2 and stuff/normal2 to stuff/normal2
130 merging sub/normal2 and stuff/normal2 to stuff/normal2
128 warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob)
131 warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob)
129 warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark')
132 warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark')
130 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
133 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
131 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
134 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
132 [1]
135 [1]
133 $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
136 $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
134 $ hg resolve -m stuff/maybelarge.dat
137 $ hg resolve -m stuff/maybelarge.dat
135 (no more unresolved files)
138 (no more unresolved files)
136 $ hg commit -m"merge"
139 $ hg commit -m"merge"
137 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
140 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
138 @ 5:4884f215abda merge
141 @ 5:4884f215abda merge
139 |\
142 |\
140 | o 4:7285f817b77e remove large, normal3
143 | o 4:7285f817b77e remove large, normal3
141 | |
144 | |
142 | o 3:67e3892e3534 add normal3, modify sub/*
145 | o 3:67e3892e3534 add normal3, modify sub/*
143 | |
146 | |
144 o | 2:c96c8beb5d56 rename sub/ to stuff/
147 o | 2:c96c8beb5d56 rename sub/ to stuff/
145 |/
148 |/
146 o 1:020c65d24e11 add sub/*
149 o 1:020c65d24e11 add sub/*
147 |
150 |
148 o 0:117b8328f97a add large, normal1
151 o 0:117b8328f97a add large, normal1
149
152
150 $ cd ..
153 $ cd ..
151
154
152 lfconvert with rename, merge, and remove
155 lfconvert with rename, merge, and remove
153 $ rm -rf largefiles-repo
156 $ rm -rf largefiles-repo
154 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
157 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
155 initializing destination largefiles-repo
158 initializing destination largefiles-repo
156 $ cd largefiles-repo
159 $ cd largefiles-repo
157 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
160 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
158 o 5:8e05f5f2b77e merge
161 o 5:8e05f5f2b77e merge
159 |\
162 |\
160 | o 4:a5a02de7a8e4 remove large, normal3
163 | o 4:a5a02de7a8e4 remove large, normal3
161 | |
164 | |
162 | o 3:55759520c76f add normal3, modify sub/*
165 | o 3:55759520c76f add normal3, modify sub/*
163 | |
166 | |
164 o | 2:261ad3f3f037 rename sub/ to stuff/
167 o | 2:261ad3f3f037 rename sub/ to stuff/
165 |/
168 |/
166 o 1:334e5237836d add sub/*
169 o 1:334e5237836d add sub/*
167 |
170 |
168 o 0:d4892ec57ce2 add large, normal1
171 o 0:d4892ec57ce2 add large, normal1
169
172
170 $ hg locate -r 2
173 $ hg locate -r 2
171 .hglf/large
174 .hglf/large
172 .hglf/stuff/maybelarge.dat
175 .hglf/stuff/maybelarge.dat
173 normal1
176 normal1
174 stuff/normal2
177 stuff/normal2
175 $ hg locate -r 3
178 $ hg locate -r 3
176 .hglf/large
179 .hglf/large
177 .hglf/sub/maybelarge.dat
180 .hglf/sub/maybelarge.dat
178 normal1
181 normal1
179 normal3
182 normal3
180 sub/normal2
183 sub/normal2
181 $ hg locate -r 4
184 $ hg locate -r 4
182 .hglf/sub/maybelarge.dat
185 .hglf/sub/maybelarge.dat
183 normal1
186 normal1
184 sub/normal2
187 sub/normal2
185 $ hg locate -r 5
188 $ hg locate -r 5
186 .hglf/stuff/maybelarge.dat
189 .hglf/stuff/maybelarge.dat
187 normal1
190 normal1
188 stuff/normal2
191 stuff/normal2
189 $ hg update
192 $ hg update
190 getting changed largefiles
193 getting changed largefiles
191 1 largefiles updated, 0 removed
194 1 largefiles updated, 0 removed
192 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
195 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 $ cat stuff/normal2
196 $ cat stuff/normal2
194 alsonormal
197 alsonormal
195 blah
198 blah
196 $ md5sum.py stuff/maybelarge.dat
199 $ md5sum.py stuff/maybelarge.dat
197 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat
200 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat
198 $ cat .hglf/stuff/maybelarge.dat
201 $ cat .hglf/stuff/maybelarge.dat
199 76236b6a2c6102826c61af4297dd738fb3b1de38
202 76236b6a2c6102826c61af4297dd738fb3b1de38
200 $ cd ..
203 $ cd ..
201
204
202 "lfconvert" error cases
205 "lfconvert" error cases
203 $ hg lfconvert http://localhost/foo foo
206 $ hg lfconvert http://localhost/foo foo
204 abort: http://localhost/foo is not a local Mercurial repo
207 abort: http://localhost/foo is not a local Mercurial repo
205 [255]
208 [255]
206 $ hg lfconvert foo ssh://localhost/foo
209 $ hg lfconvert foo ssh://localhost/foo
207 abort: ssh://localhost/foo is not a local Mercurial repo
210 abort: ssh://localhost/foo is not a local Mercurial repo
208 [255]
211 [255]
209 $ hg lfconvert nosuchrepo foo
212 $ hg lfconvert nosuchrepo foo
210 abort: repository nosuchrepo not found!
213 abort: repository nosuchrepo not found!
211 [255]
214 [255]
212 $ hg share -q -U bigfile-repo shared
215 $ hg share -q -U bigfile-repo shared
213 $ printf 'bogus' > shared/.hg/sharedpath
216 $ printf 'bogus' > shared/.hg/sharedpath
214 $ hg lfconvert shared foo
217 $ hg lfconvert shared foo
215 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob)
218 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob)
216 [255]
219 [255]
217 $ hg lfconvert bigfile-repo largefiles-repo
220 $ hg lfconvert bigfile-repo largefiles-repo
218 initializing destination largefiles-repo
221 initializing destination largefiles-repo
219 abort: repository largefiles-repo already exists!
222 abort: repository largefiles-repo already exists!
220 [255]
223 [255]
221
224
222 add another largefile to the new largefiles repo
225 add another largefile to the new largefiles repo
223 $ cd largefiles-repo
226 $ cd largefiles-repo
224 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null
227 $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null
225 $ hg add --lfsize=1 anotherlarge
228 $ hg add --lfsize=1 anotherlarge
226 $ hg commit -m "add anotherlarge (should be a largefile)"
229 $ hg commit -m "add anotherlarge (should be a largefile)"
227 $ cat .hglf/anotherlarge
230 $ cat .hglf/anotherlarge
228 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
231 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
229 $ hg tag mytag
232 $ hg tag mytag
230 $ cd ..
233 $ cd ..
231
234
232 round-trip: converting back to a normal (non-largefiles) repo with
235 round-trip: converting back to a normal (non-largefiles) repo with
233 "lfconvert --to-normal" should give the same as ../bigfile-repo
236 "lfconvert --to-normal" should give the same as ../bigfile-repo
234 $ cd largefiles-repo
237 $ cd largefiles-repo
235 $ hg lfconvert --to-normal . ../normal-repo
238 $ hg lfconvert --to-normal . ../normal-repo
236 initializing destination ../normal-repo
239 initializing destination ../normal-repo
237 0 additional largefiles cached
240 0 additional largefiles cached
238 scanning source...
241 scanning source...
239 sorting...
242 sorting...
240 converting...
243 converting...
241 7 add large, normal1
244 7 add large, normal1
242 6 add sub/*
245 6 add sub/*
243 5 rename sub/ to stuff/
246 5 rename sub/ to stuff/
244 4 add normal3, modify sub/*
247 4 add normal3, modify sub/*
245 3 remove large, normal3
248 3 remove large, normal3
246 2 merge
249 2 merge
247 1 add anotherlarge (should be a largefile)
250 1 add anotherlarge (should be a largefile)
248 0 Added tag mytag for changeset abacddda7028
251 0 Added tag mytag for changeset abacddda7028
249 $ cd ../normal-repo
252 $ cd ../normal-repo
250 $ cat >> .hg/hgrc <<EOF
253 $ cat >> .hg/hgrc <<EOF
251 > [extensions]
254 > [extensions]
252 > largefiles = !
255 > largefiles = !
253 > EOF
256 > EOF
254
257
255 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
258 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
256 o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4
259 o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4
257 |
260 |
258 o 6:867ab992ecf4 add anotherlarge (should be a largefile)
261 o 6:867ab992ecf4 add anotherlarge (should be a largefile)
259 |
262 |
260 o 5:4884f215abda merge
263 o 5:4884f215abda merge
261 |\
264 |\
262 | o 4:7285f817b77e remove large, normal3
265 | o 4:7285f817b77e remove large, normal3
263 | |
266 | |
264 | o 3:67e3892e3534 add normal3, modify sub/*
267 | o 3:67e3892e3534 add normal3, modify sub/*
265 | |
268 | |
266 o | 2:c96c8beb5d56 rename sub/ to stuff/
269 o | 2:c96c8beb5d56 rename sub/ to stuff/
267 |/
270 |/
268 o 1:020c65d24e11 add sub/*
271 o 1:020c65d24e11 add sub/*
269 |
272 |
270 o 0:117b8328f97a add large, normal1
273 o 0:117b8328f97a add large, normal1
271
274
272 $ hg update
275 $ hg update
273 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
274 $ hg locate
277 $ hg locate
275 .hgtags
278 .hgtags
276 anotherlarge
279 anotherlarge
277 normal1
280 normal1
278 stuff/maybelarge.dat
281 stuff/maybelarge.dat
279 stuff/normal2
282 stuff/normal2
280 $ [ -d .hg/largefiles ] && echo fail || echo pass
283 $ [ -d .hg/largefiles ] && echo fail || echo pass
281 pass
284 pass
282
285
283 $ cd ..
286 $ cd ..
284
287
285 Clearing the usercache ensures that commitctx doesn't try to cache largefiles
288 Clearing the usercache ensures that commitctx doesn't try to cache largefiles
286 from the working dir on a convert.
289 from the working dir on a convert.
287 $ rm "${USERCACHE}"/*
290 $ rm "${USERCACHE}"/*
288 $ hg convert largefiles-repo
291 $ hg convert largefiles-repo
289 assuming destination largefiles-repo-hg
292 assuming destination largefiles-repo-hg
290 initializing destination largefiles-repo-hg repository
293 initializing destination largefiles-repo-hg repository
291 scanning source...
294 scanning source...
292 sorting...
295 sorting...
293 converting...
296 converting...
294 7 add large, normal1
297 7 add large, normal1
295 6 add sub/*
298 6 add sub/*
296 5 rename sub/ to stuff/
299 5 rename sub/ to stuff/
297 4 add normal3, modify sub/*
300 4 add normal3, modify sub/*
298 3 remove large, normal3
301 3 remove large, normal3
299 2 merge
302 2 merge
300 1 add anotherlarge (should be a largefile)
303 1 add anotherlarge (should be a largefile)
301 0 Added tag mytag for changeset abacddda7028
304 0 Added tag mytag for changeset abacddda7028
302
305
303 $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
306 $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
304 o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd
307 o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd
305 |
308 |
306 o 6:17126745edfd add anotherlarge (should be a largefile)
309 o 6:17126745edfd add anotherlarge (should be a largefile)
307 |
310 |
308 o 5:9cc5aa7204f0 merge
311 o 5:9cc5aa7204f0 merge
309 |\
312 |\
310 | o 4:a5a02de7a8e4 remove large, normal3
313 | o 4:a5a02de7a8e4 remove large, normal3
311 | |
314 | |
312 | o 3:55759520c76f add normal3, modify sub/*
315 | o 3:55759520c76f add normal3, modify sub/*
313 | |
316 | |
314 o | 2:261ad3f3f037 rename sub/ to stuff/
317 o | 2:261ad3f3f037 rename sub/ to stuff/
315 |/
318 |/
316 o 1:334e5237836d add sub/*
319 o 1:334e5237836d add sub/*
317 |
320 |
318 o 0:d4892ec57ce2 add large, normal1
321 o 0:d4892ec57ce2 add large, normal1
319
322
320 Verify will fail (for now) if the usercache is purged before converting, since
323 Verify will fail (for now) if the usercache is purged before converting, since
321 largefiles are not cached in the converted repo's local store by the conversion
324 largefiles are not cached in the converted repo's local store by the conversion
322 process.
325 process.
323 $ cd largefiles-repo-hg
326 $ cd largefiles-repo-hg
324 $ cat >> .hg/hgrc <<EOF
327 $ cat >> .hg/hgrc <<EOF
325 > [experimental]
328 > [experimental]
326 > evolution=createmarkers
329 > evolution=createmarkers
327 > EOF
330 > EOF
328 $ hg debugobsolete `hg log -r tip -T "{node}"`
331 $ hg debugobsolete `hg log -r tip -T "{node}"`
329 $ cd ..
332 $ cd ..
330
333
331 $ hg -R largefiles-repo-hg verify --large --lfa
334 $ hg -R largefiles-repo-hg verify --large --lfa
332 checking changesets
335 checking changesets
333 checking manifests
336 checking manifests
334 crosschecking files in changesets and manifests
337 crosschecking files in changesets and manifests
335 checking files
338 checking files
336 9 files, 8 changesets, 13 total revisions
339 9 files, 8 changesets, 13 total revisions
337 searching 7 changesets for largefiles
340 searching 7 changesets for largefiles
338 changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob)
341 changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 (glob)
339 changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)
342 changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)
340 changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)
343 changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c (glob)
341 changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob)
344 changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob)
342 changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob)
345 changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 (glob)
343 changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob)
346 changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (glob)
344 verified existence of 6 revisions of 4 largefiles
347 verified existence of 6 revisions of 4 largefiles
345 [1]
348 [1]
346 $ hg -R largefiles-repo-hg showconfig paths
349 $ hg -R largefiles-repo-hg showconfig paths
347 [1]
350 [1]
348
351
349
352
350 Avoid a traceback if a largefile isn't available (issue3519)
353 Avoid a traceback if a largefile isn't available (issue3519)
351
354
352 Ensure the largefile can be cached in the source if necessary
355 Ensure the largefile can be cached in the source if necessary
353 $ hg clone -U largefiles-repo issue3519
356 $ hg clone -U largefiles-repo issue3519
354 $ rm -f "${USERCACHE}"/*
357 $ rm -f "${USERCACHE}"/*
355 $ hg lfconvert --to-normal issue3519 normalized3519
358 $ hg lfconvert --to-normal issue3519 normalized3519
356 initializing destination normalized3519
359 initializing destination normalized3519
357 4 additional largefiles cached
360 4 additional largefiles cached
358 scanning source...
361 scanning source...
359 sorting...
362 sorting...
360 converting...
363 converting...
361 7 add large, normal1
364 7 add large, normal1
362 6 add sub/*
365 6 add sub/*
363 5 rename sub/ to stuff/
366 5 rename sub/ to stuff/
364 4 add normal3, modify sub/*
367 4 add normal3, modify sub/*
365 3 remove large, normal3
368 3 remove large, normal3
366 2 merge
369 2 merge
367 1 add anotherlarge (should be a largefile)
370 1 add anotherlarge (should be a largefile)
368 0 Added tag mytag for changeset abacddda7028
371 0 Added tag mytag for changeset abacddda7028
369
372
370 Ensure the abort message is useful if a largefile is entirely unavailable
373 Ensure the abort message is useful if a largefile is entirely unavailable
371 $ rm -rf normalized3519
374 $ rm -rf normalized3519
372 $ rm "${USERCACHE}"/*
375 $ rm "${USERCACHE}"/*
373 $ rm issue3519/.hg/largefiles/*
376 $ rm issue3519/.hg/largefiles/*
374 $ rm largefiles-repo/.hg/largefiles/*
377 $ rm largefiles-repo/.hg/largefiles/*
375 $ hg lfconvert --to-normal issue3519 normalized3519
378 $ hg lfconvert --to-normal issue3519 normalized3519
376 initializing destination normalized3519
379 initializing destination normalized3519
377 anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob)
380 anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob)
378 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
381 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
379 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
382 stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
380 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
383 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
381 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
384 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
382 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
385 sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob)
383 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
386 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
384 stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob)
387 stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob)
385 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
388 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
386 sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob)
389 sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob)
387 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
390 large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob)
388 0 additional largefiles cached
391 0 additional largefiles cached
389 11 largefiles failed to download
392 11 largefiles failed to download
390 abort: all largefiles must be present locally
393 abort: all largefiles must be present locally
391 [255]
394 [255]
392
395
393
396
General Comments 0
You need to be logged in to leave comments. Login now