localrepo: support background closing for wwrite()
So working copy update can pass it in.
--- 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)