downgrade: don't assume existence of nodemap files when downgrading stable
authorRaphaël Gomès <rgomes@octobus.net>
Thu, 25 Nov 2021 18:26:50 +0100
branchstable
changeset 48424 897aa0c4da4a
parent 48412 602120a96072
child 48434 d4c084160434
downgrade: don't assume existence of nodemap files when downgrading Persistent nodemap files might not exist on a fresh repository, so ignore the potential missing file errors. Differential Revision: https://phab.mercurial-scm.org/D11806
mercurial/revlogutils/nodemap.py
--- a/mercurial/revlogutils/nodemap.py	Tue Dec 07 15:01:30 2021 +0100
+++ b/mercurial/revlogutils/nodemap.py	Thu Nov 25 18:26:50 2021 +0100
@@ -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):