mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
vfs: add "writelines"
This patch allows "writelines" to take "mode" and "notindexed" arguments, because subsequent patch for subrepo requires both.
This commit is contained in:
parent
f60bafa1b3
commit
86bc73ffa9
@ -229,6 +229,13 @@ class abstractvfs(object):
|
||||
finally:
|
||||
fp.close()
|
||||
|
||||
def writelines(self, path, data, mode='wb', notindexed=False):
|
||||
fp = self(path, mode=mode, notindexed=notindexed)
|
||||
try:
|
||||
return fp.writelines(data)
|
||||
finally:
|
||||
fp.close()
|
||||
|
||||
def append(self, path, data):
|
||||
fp = self(path, 'ab')
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user