comparison mercurial/upgrade_utils/engine.py @ 46380:f2c4224e6648

upgrade: update only requirements if we can Upgrade operations which involves just upgrading requirements earlier used to go through whole revlog cloning business. Now we just upgrade the requirement and skip the cloning part. Differential Revision: https://phab.mercurial-scm.org/D9775
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 14 Jan 2021 16:37:10 +0530
parents ee9002b99595
children 45c3a263d5d1
comparison
equal deleted inserted replaced
46379:ee9002b99595 46380:f2c4224e6648
447 b'(it is safe to interrupt this process any time before ' 447 b'(it is safe to interrupt this process any time before '
448 b'data migration completes)\n' 448 b'data migration completes)\n'
449 ) 449 )
450 ) 450 )
451 451
452 if True: 452 if not upgrade_op.requirements_only:
453 with dstrepo.transaction(b'upgrade') as tr: 453 with dstrepo.transaction(b'upgrade') as tr:
454 _clonerevlogs( 454 _clonerevlogs(
455 ui, 455 ui,
456 srcrepo, 456 srcrepo,
457 dstrepo, 457 dstrepo,
531 # reference to its new location. So clean it up manually. Alternatively, we 531 # reference to its new location. So clean it up manually. Alternatively, we
532 # could update srcrepo.svfs and other variables to point to the new 532 # could update srcrepo.svfs and other variables to point to the new
533 # location. This is simpler. 533 # location. This is simpler.
534 backupvfs.unlink(b'store/lock') 534 backupvfs.unlink(b'store/lock')
535 else: 535 else:
536 pass 536 ui.status(_(b'upgrading repository requirements\n'))
537 scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
537 538
538 return backuppath 539 return backuppath