From patchwork Thu Nov 25 17:27:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11806: downgrade: don't assume existence of nodemap files when downgrading From: phabricator X-Patchwork-Id: 50132 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 25 Nov 2021 17:27:17 +0000 Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Persistent nodemap files might not exist on a fresh repository, so ignore the potential missing file errors. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11806 AFFECTED FILES mercurial/revlogutils/nodemap.py CHANGE DETAILS To: Alphare, #hg-reviewers 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 @@ -147,7 +147,7 @@ if revlog._nodemap_file is None: msg = "calling persist nodemap on a revlog without the feature enabled" raise error.ProgrammingError(msg) - repo.svfs.unlink(revlog._nodemap_file) + repo.svfs.tryunlink(revlog._nodemap_file) def persist_nodemap(tr, revlog, pending=False, force=False):