diff mercurial/repocache.py @ 51103:d83d788590a8

changelog-delay: move the delay/divert logic inside the (inner) revlog Instead of hacking throught the vfs/opener, we implement the delay/divert logic inside the `_InnerRevlog` and `randomaccessfile` object. This will allow to an alternative implementation of the `_InnerRevlog` that does not need to use Python details. As a result, the new implementation can use the transaction less agressively and avoid some extra output since no data had been written yet. That seems like a good side effect.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 24 Oct 2023 11:08:49 +0200
parents 642e31cb55f0
children 630d5283ee82
line wrap: on
line diff
--- a/mercurial/repocache.py	Thu Oct 26 05:37:37 2023 +0200
+++ b/mercurial/repocache.py	Tue Oct 24 11:08:49 2023 +0200
@@ -129,7 +129,7 @@
     srcfilecache = srcrepo._filecache
     if b'changelog' in srcfilecache:
         destfilecache[b'changelog'] = ce = srcfilecache[b'changelog']
-        ce.obj.opener = ce.obj._realopener = destrepo.svfs
+        ce.obj.opener = ce.obj._inner.opener = destrepo.svfs
     if b'obsstore' in srcfilecache:
         destfilecache[b'obsstore'] = ce = srcfilecache[b'obsstore']
         ce.obj.svfs = destrepo.svfs