Patchwork [2,of,4] localrepo: support background closing for wwrite()

mail settings
Submitter Gregory Szorc
Date Feb. 20, 2016, 11:55 p.m.
Message ID <00737ed8be720d94a12f.1456012558@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/13276/
State Accepted
Headers show


Gregory Szorc - Feb. 20, 2016, 11:55 p.m.
# HG changeset patch
# User Gregory Szorc <>
# Date 1456010727 28800
#      Sat Feb 20 15:25:27 2016 -0800
# Node ID 00737ed8be720d94a12f14407c5e91b347d33efe
# Parent  5f5a32bf365ee87f37c201df2a667a7332779653
localrepo: support background closing for wwrite()

So working copy update can pass it in.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -980,26 +980,26 @@  class localrepository(object):
     def wread(self, filename):
         if self._link(filename):
             data = self.wvfs.readlink(filename)
             data =
         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.
         data = self._filter(self._decodefilterpats, filename, data)
         if 'l' in flags:
             self.wvfs.symlink(data, filename)
-            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)
     def wwritedata(self, filename, data):
         return self._filter(self._decodefilterpats, filename, data)
     def currenttransaction(self):