mercurial/vfs.py
changeset 52927 b6f24a92b399
parent 52901 6ee3c401882b
child 52929 5b8f6e198a6e
--- a/mercurial/vfs.py	Fri Nov 29 22:22:54 2024 +0100
+++ b/mercurial/vfs.py	Sat Nov 30 02:24:22 2024 +0100
@@ -556,6 +556,7 @@
         checkambig: bool = False,
         auditpath: bool = True,
         makeparentdirs: bool = True,
+        buffering: int = -1,
     ) -> Any:  # TODO: should be BinaryIO if util.atomictempfile can be coersed
         """Open ``path`` file, which is relative to vfs root.
 
@@ -626,7 +627,7 @@
                         self._trustnlink = nlink > 1 or util.checknlink(f)
                     if nlink > 1 or not self._trustnlink:
                         util.rename(util.mktempcopy(f), f)
-        fp = util.posixfile(f, mode)
+        fp = util.posixfile(f, mode, buffering=buffering)
         if nlink == 0:
             self._fixfilemode(f)