mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +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:
|
finally:
|
||||||
fp.close()
|
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):
|
def append(self, path, data):
|
||||||
fp = self(path, 'ab')
|
fp = self(path, 'ab')
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user