mercurial/upgrade_utils/engine.py
changeset 46467 45c3a263d5d1
parent 46380 f2c4224e6648
child 46472 98e39f04d60e
equal deleted inserted replaced
46466:3e3b81b6e7da 46467:45c3a263d5d1
   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 not upgrade_op.requirements_only:
   452     if upgrade_op.requirements_only:
       
   453         ui.status(_(b'upgrading repository requirements\n'))
       
   454         scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
       
   455     else:
   453         with dstrepo.transaction(b'upgrade') as tr:
   456         with dstrepo.transaction(b'upgrade') as tr:
   454             _clonerevlogs(
   457             _clonerevlogs(
   455                 ui,
   458                 ui,
   456                 srcrepo,
   459                 srcrepo,
   457                 dstrepo,
   460                 dstrepo,
   530             # The lock file from the old store won't be removed because nothing has a
   533             # The lock file from the old store won't be removed because nothing has a
   531             # reference to its new location. So clean it up manually. Alternatively, we
   534             # 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
   535             # could update srcrepo.svfs and other variables to point to the new
   533             # location. This is simpler.
   536             # location. This is simpler.
   534             backupvfs.unlink(b'store/lock')
   537             backupvfs.unlink(b'store/lock')
   535     else:
       
   536         ui.status(_(b'upgrading repository requirements\n'))
       
   537         scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
       
   538 
   538 
   539     return backuppath
   539     return backuppath