diff mercurial/vfs.py @ 53039:46603c00a9f2 stable

stream: audit path on encoded path In 5b8f6e198a6e, we wrongly called `vfs._auditpath` on the pre-encoding path, so we would get abort on problem that the encoding is here to handle. So we fix the problem (easily) and update the test to cover this (with significantly more work). Thanks to Matt Harbison for spotting this during the freeze.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 11 Mar 2025 10:37:39 +0100
parents 22e264ac7f60
children
line wrap: on
line diff
--- a/mercurial/vfs.py	Tue Mar 11 10:33:15 2025 +0100
+++ b/mercurial/vfs.py	Tue Mar 11 10:37:39 2025 +0100
@@ -476,9 +476,9 @@
             <path> is the real file system path content should be written to,
             <mode> is the file mode that need to be set if any.
         """
-        self._auditpath(path, b'wb')
+        real_path = self.join(path)
+        self._auditpath(real_path, b'wb')
         self.register_file(path)
-        real_path = self.join(path)
         dirname, basename = util.split(real_path)
         if dirname not in known_directories:
             util.makedirs(dirname, self.createmode, True)