Read about our upcoming Code of Conduct on this issue

Commit 9f676b8e authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

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.
parent c82d6363bc9e
......@@ -468,6 +468,13 @@ def upgrade(ui, srcrepo, dstrepo, upgrade_op):
unfi = srcrepo.unfiltered()
cl = unfi.changelog
nodemap.persist_nodemap(tr, cl, force=True)
# we want to directly operate on the underlying revlog to force
# create a nodemap file. This is fine since this is upgrade code
# and it heavily relies on repository being revlog based
# hence accessing private attributes can be justified
tr, unfi.manifestlog._rootstore._revlog, force=True
scmutil.writereporequirements(srcrepo, upgrade_op.new_requirements)
with dstrepo.transaction(b'upgrade') as tr:
......@@ -641,6 +641,8 @@ upgrading
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00manifest-*.nd (glob)
$ hg debugnodemap --metadata
uid: * (glob)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment