Mercurial > hg-stable
changeset 20055:6bb9de1e4d16
statichttprepo.httprangeheader: implement readlines
bookmarks.readcurrent() requires readlines() on file objects returned from
repo.vfs. It isn't used right now but will be in upcoming patches.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sun, 17 Nov 2013 13:31:18 -0800 |
parents | d0789ce427ac |
children | 5e301ca90b26 |
files | mercurial/statichttprepo.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Sun Nov 17 13:28:11 2013 -0800 +++ b/mercurial/statichttprepo.py Sun Nov 17 13:31:18 2013 -0800 @@ -54,8 +54,10 @@ data = data[:bytes] self.pos += len(data) return data + def readlines(self): + return self.read().splitlines(True) def __iter__(self): - return iter(self.read().splitlines(True)) + return iter(self.readlines()) def close(self): pass