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:
FUJIWARA Katsunori 2014-11-19 18:35:14 +09:00
parent f60bafa1b3
commit 86bc73ffa9

View File

@ -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: