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