diff mercurial/localrepo.py @ 28198:ddc07ddcca94

localrepo: support background closing for wwrite() So working copy update can pass it in.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 20 Feb 2016 15:25:27 -0800
parents ad11edefa7c4
children d77b790bd8d6
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Feb 20 15:24:12 2016 -0800
+++ b/mercurial/localrepo.py	Sat Feb 20 15:25:27 2016 -0800
@@ -974,7 +974,7 @@
             data = self.wvfs.read(filename)
         return self._filter(self._encodefilterpats, filename, data)
 
-    def wwrite(self, filename, data, flags):
+    def wwrite(self, filename, data, flags, backgroundclose=False):
         """write ``data`` into ``filename`` in the working directory
 
         This returns length of written (maybe decoded) data.
@@ -983,7 +983,7 @@
         if 'l' in flags:
             self.wvfs.symlink(data, filename)
         else:
-            self.wvfs.write(filename, data)
+            self.wvfs.write(filename, data, backgroundclose=backgroundclose)
             if 'x' in flags:
                 self.wvfs.setflags(filename, False, True)
         return len(data)