comparison mercurial/upgrade_utils/engine.py @ 46191:aba979b1b90b

upgrade: move `printrequirements()` to UpgradeOperation class Part of refactor where we make things more arranged and integrated into single `UpgradeOperation` class. Differential Revision: https://phab.mercurial-scm.org/D9577
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 12 Dec 2020 18:09:16 +0530
parents dfddcbb0c244
children 85f7cf314b39
comparison
equal deleted inserted replaced
46190:9ab2ab5bf9af 46191:aba979b1b90b
427 427
428 # Now copy other files in the store directory. 428 # Now copy other files in the store directory.
429 # The sorted() makes execution deterministic. 429 # The sorted() makes execution deterministic.
430 for p, kind, st in sorted(srcrepo.store.vfs.readdir(b'', stat=True)): 430 for p, kind, st in sorted(srcrepo.store.vfs.readdir(b'', stat=True)):
431 if not _filterstorefile( 431 if not _filterstorefile(
432 srcrepo, dstrepo, upgrade_op.requirements, p, kind, st 432 srcrepo, dstrepo, upgrade_op.new_requirements, p, kind, st
433 ): 433 ):
434 continue 434 continue
435 435
436 srcrepo.ui.status(_(b'copying %s\n') % p) 436 srcrepo.ui.status(_(b'copying %s\n') % p)
437 src = srcrepo.store.rawvfs.join(p) 437 src = srcrepo.store.rawvfs.join(p)
487 _( 487 _(
488 b'finalizing requirements file and making repository readable ' 488 b'finalizing requirements file and making repository readable '
489 b'again\n' 489 b'again\n'
490 ) 490 )
491 ) 491 )
492 scmutil.writereporequirements(srcrepo, upgrade_op.requirements) 492 scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
493 493
494 # The lock file from the old store won't be removed because nothing has a 494 # The lock file from the old store won't be removed because nothing has a
495 # reference to its new location. So clean it up manually. Alternatively, we 495 # reference to its new location. So clean it up manually. Alternatively, we
496 # could update srcrepo.svfs and other variables to point to the new 496 # could update srcrepo.svfs and other variables to point to the new
497 # location. This is simpler. 497 # location. This is simpler.