equal
deleted
inserted
replaced
406 return False |
406 return False |
407 |
407 |
408 return True |
408 return True |
409 |
409 |
410 |
410 |
411 def _finishdatamigration(ui, srcrepo, dstrepo, requirements): |
411 def finishdatamigration(ui, srcrepo, dstrepo, requirements): |
412 """Hook point for extensions to perform additional actions during upgrade. |
412 """Hook point for extensions to perform additional actions during upgrade. |
413 |
413 |
414 This function is called after revlogs and store files have been copied but |
414 This function is called after revlogs and store files have been copied but |
415 before the new store is swapped into the original location. |
415 before the new store is swapped into the original location. |
416 """ |
416 """ |
456 srcrepo.ui.status(_(b'copying %s\n') % p) |
456 srcrepo.ui.status(_(b'copying %s\n') % p) |
457 src = srcrepo.store.rawvfs.join(p) |
457 src = srcrepo.store.rawvfs.join(p) |
458 dst = dstrepo.store.rawvfs.join(p) |
458 dst = dstrepo.store.rawvfs.join(p) |
459 util.copyfile(src, dst, copystat=True) |
459 util.copyfile(src, dst, copystat=True) |
460 |
460 |
461 _finishdatamigration(ui, srcrepo, dstrepo, requirements) |
461 finishdatamigration(ui, srcrepo, dstrepo, requirements) |
462 |
462 |
463 ui.status(_(b'data fully migrated to temporary repository\n')) |
463 ui.status(_(b'data fully migrated to temporary repository\n')) |
464 |
464 |
465 backuppath = pycompat.mkdtemp(prefix=b'upgradebackup.', dir=srcrepo.path) |
465 backuppath = pycompat.mkdtemp(prefix=b'upgradebackup.', dir=srcrepo.path) |
466 backupvfs = vfsmod.vfs(backuppath) |
466 backupvfs = vfsmod.vfs(backuppath) |