comparison mercurial/upgrade_utils/engine.py @ 46575:636853347e14

upgrade: write nodemap for manifests too In 98e39f04d60e I assumed that writing nodemap for manifests was not desirable and stopped writing it during upgrade. However in recent discussion with Pierre-Yves, I learnt that that's not true. Differential Revision: https://phab.mercurial-scm.org/D9991
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 15 Feb 2021 15:13:20 +0530
parents 98e39f04d60e
children 67b5fafd3a46
comparison
equal deleted inserted replaced
46574:e3f23814bac7 46575:636853347e14
466 ) 466 )
467 with srcrepo.transaction(b'upgrade') as tr: 467 with srcrepo.transaction(b'upgrade') as tr:
468 unfi = srcrepo.unfiltered() 468 unfi = srcrepo.unfiltered()
469 cl = unfi.changelog 469 cl = unfi.changelog
470 nodemap.persist_nodemap(tr, cl, force=True) 470 nodemap.persist_nodemap(tr, cl, force=True)
471 # we want to directly operate on the underlying revlog to force
472 # create a nodemap file. This is fine since this is upgrade code
473 # and it heavily relies on repository being revlog based
474 # hence accessing private attributes can be justified
475 nodemap.persist_nodemap(
476 tr, unfi.manifestlog._rootstore._revlog, force=True
477 )
471 scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements) 478 scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
472 else: 479 else:
473 with dstrepo.transaction(b'upgrade') as tr: 480 with dstrepo.transaction(b'upgrade') as tr:
474 _clonerevlogs( 481 _clonerevlogs(
475 ui, 482 ui,