changeset 28197:2ada62388bb1

scmutil: support background closing for write() Upcoming patches will add background file closer support to working copy update. This patch adds some plumbing to prepare for that.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 20 Feb 2016 15:24:12 -0800
parents 87de4a22e8c2
children ddc07ddcca94
files mercurial/scmutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Tue Feb 16 11:08:52 2016 +0000
+++ b/mercurial/scmutil.py	Sat Feb 20 15:24:12 2016 -0800
@@ -276,8 +276,8 @@
         with self(path, mode=mode) as fp:
             return fp.readlines()
 
-    def write(self, path, data):
-        with self(path, 'wb') as fp:
+    def write(self, path, data, backgroundclose=False):
+        with self(path, 'wb', backgroundclose=backgroundclose) as fp:
             return fp.write(data)
 
     def writelines(self, path, data, mode='wb', notindexed=False):