revlog: add an early return for getting sidedata
authorRaphaël Gomès <rgomes@octobus.net>
Wed, 19 Jun 2024 17:26:06 +0200
changeset 51857 b04011ca6eff
parent 51856 384016e91947
child 51858 2fd44b3dcc33
revlog: add an early return for getting sidedata No point in trying to fetch sidedata if there isn't a sidedata file.
mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Jun 19 17:19:20 2024 +0200
+++ b/mercurial/revlog.py	Wed Jun 19 17:26:06 2024 +0200
@@ -2810,6 +2810,8 @@
 
     def _sidedata(self, rev):
         """Return the sidedata for a given revision number."""
+        if self._sidedatafile is None:
+            return {}
         sidedata_end = None
         if self._docket is not None:
             sidedata_end = self._docket.sidedata_end