mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
workingfilectx: add backgroundclose as a kwarg to write()
This is necessary because some callers in merge.py pass backgroundclose=True when writing. As with previous changes in this series, this should be a no-op.
This commit is contained in:
parent
67430178c3
commit
8b63d9e6f0
@ -1892,9 +1892,10 @@ class workingfilectx(committablefilectx):
|
||||
"""wraps unlink for a repo's working directory"""
|
||||
self._repo.wvfs.unlinkpath(self._path, ignoremissing=ignoremissing)
|
||||
|
||||
def write(self, data, flags):
|
||||
def write(self, data, flags, backgroundclose=False):
|
||||
"""wraps repo.wwrite"""
|
||||
self._repo.wwrite(self._path, data, flags)
|
||||
self._repo.wwrite(self._path, data, flags,
|
||||
backgroundclose=backgroundclose)
|
||||
|
||||
def setflags(self, l, x):
|
||||
self._repo.wvfs.setflags(self._path, l, x)
|
||||
|
@ -1130,7 +1130,6 @@ def batchget(repo, mctx, wctx, actions):
|
||||
"""
|
||||
verbose = repo.ui.verbose
|
||||
fctx = mctx.filectx
|
||||
wwrite = repo.wwrite
|
||||
ui = repo.ui
|
||||
i = 0
|
||||
with repo.wvfs.backgroundclosing(ui, expectedcount=len(actions)):
|
||||
@ -1151,7 +1150,7 @@ def batchget(repo, mctx, wctx, actions):
|
||||
|
||||
if repo.wvfs.isdir(f) and not repo.wvfs.islink(f):
|
||||
repo.wvfs.removedirs(f)
|
||||
wwrite(f, fctx(f).data(), flags, backgroundclose=True)
|
||||
wctx[f].write(fctx(f).data(), flags, backgroundclose=True)
|
||||
if i == 100:
|
||||
yield i, f
|
||||
i = 0
|
||||
|
Loading…
Reference in New Issue
Block a user