Show More
@@ -868,14 +868,15 def _upgraderepo(ui, srcrepo, dstrepo, r | |||
|
868 | 868 | 'redeltamultibase' in actions) |
|
869 | 869 | |
|
870 | 870 | # Now copy other files in the store directory. |
|
871 | for p, kind, st in srcrepo.store.vfs.readdir('', stat=True): | |
|
871 | # The sorted() makes execution deterministic. | |
|
872 | for p, kind, st in sorted(srcrepo.store.vfs.readdir('', stat=True)): | |
|
872 | 873 | if not _upgradefilterstorefile(srcrepo, dstrepo, requirements, |
|
873 | 874 | p, kind, st): |
|
874 | 875 | continue |
|
875 | 876 | |
|
876 | 877 | srcrepo.ui.write(_('copying %s\n') % p) |
|
877 | src = srcrepo.store.vfs.join(p) | |
|
878 | dst = dstrepo.store.vfs.join(p) | |
|
878 | src = srcrepo.store.rawvfs.join(p) | |
|
879 | dst = dstrepo.store.rawvfs.join(p) | |
|
879 | 880 | util.copyfile(src, dst, copystat=True) |
|
880 | 881 | |
|
881 | 882 | _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements) |
@@ -310,3 +310,45 old store should be backed up | |||
|
310 | 310 | undo.phaseroots |
|
311 | 311 | |
|
312 | 312 | $ cd .. |
|
313 | ||
|
314 | store files with special filenames aren't encoded during copy | |
|
315 | ||
|
316 | $ hg init store-filenames | |
|
317 | $ cd store-filenames | |
|
318 | $ touch foo | |
|
319 | $ hg -q commit -A -m initial | |
|
320 | $ touch .hg/store/.XX_special_filename | |
|
321 | ||
|
322 | $ hg debugupgraderepo --run | |
|
323 | upgrade will perform the following actions: | |
|
324 | ||
|
325 | requirements | |
|
326 | preserved: dotencode, fncache, generaldelta, revlogv1, store | |
|
327 | ||
|
328 | beginning upgrade... | |
|
329 | repository locked and read-only | |
|
330 | creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
|
331 | (it is safe to interrupt this process any time before data migration completes) | |
|
332 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
|
333 | migrating 109 bytes in store; 107 bytes tracked data | |
|
334 | migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data) | |
|
335 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
|
336 | migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data) | |
|
337 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
|
338 | migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data) | |
|
339 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
|
340 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
|
341 | copying .XX_special_filename | |
|
342 | copying phaseroots | |
|
343 | data fully migrated to temporary repository | |
|
344 | marking source repository as being upgraded; clients will be unable to read from repository | |
|
345 | starting in-place swap of repository data | |
|
346 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
|
347 | replacing store... | |
|
348 | store replacement complete; repository was inconsistent for *s (glob) | |
|
349 | finalizing requirements file and making repository readable again | |
|
350 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
|
351 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
|
352 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
|
353 | ||
|
354 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now