diff mercurial/localrepo.py @ 35725:2a7e777c9eed

write: add the possibility to pass keyword argument from batchget to vfs We are going to pass atomictemp keyword argument from merge.baychget to vfs.__call__. Update all the frames to accept **kwargs and pass it to the next function. Differential Revision: https://phab.mercurial-scm.org/D1881
author Boris Feld <boris.feld@octobus.net>
date Wed, 17 Jan 2018 16:52:13 +0100
parents 03e921942163
children 45b678bf3a78
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Jan 18 12:55:19 2018 +0100
+++ b/mercurial/localrepo.py	Wed Jan 17 16:52:13 2018 +0100
@@ -1099,7 +1099,7 @@
             data = self.wvfs.read(filename)
         return self._filter(self._encodefilterpats, filename, data)
 
-    def wwrite(self, filename, data, flags, backgroundclose=False):
+    def wwrite(self, filename, data, flags, backgroundclose=False, **kwargs):
         """write ``data`` into ``filename`` in the working directory
 
         This returns length of written (maybe decoded) data.
@@ -1108,7 +1108,8 @@
         if 'l' in flags:
             self.wvfs.symlink(data, filename)
         else:
-            self.wvfs.write(filename, data, backgroundclose=backgroundclose)
+            self.wvfs.write(filename, data, backgroundclose=backgroundclose,
+                            **kwargs)
             if 'x' in flags:
                 self.wvfs.setflags(filename, False, True)
         return len(data)