From patchwork Thu Apr 23 18:13:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D8408: nodemap: skip persistent nodemap warming for revlog not using it From: phabricator X-Patchwork-Id: 46225 Message-Id: <86346de047e2405a35a6d7c274cb8660@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 23 Apr 2020 18:13:53 +0000 Herald added a subscriber: mercurial-patches. Closed by commit rHGb4537125eb3c: nodemap: skip persistent nodemap warming for revlog not using it (authored by marmoute). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8408?vs=21089&id=21203 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8408/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8408 AFFECTED FILES mercurial/revlogutils/nodemap.py CHANGE DETAILS To: marmoute, #hg-reviewers, pulkit, Alphare Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/revlogutils/nodemap.py b/mercurial/revlogutils/nodemap.py --- a/mercurial/revlogutils/nodemap.py +++ b/mercurial/revlogutils/nodemap.py @@ -112,6 +112,11 @@ To be used for updating the nodemap on disk outside of a normal transaction setup (eg, `debugupdatecache`). """ + if revlog._inline: + return # inlined revlog are too small for this to be relevant + if revlog.nodemap_file is None: + return # we do not use persistent_nodemap on this revlog + notr = _NoTransaction() _persist_nodemap(notr, revlog) for k in sorted(notr._postclose):