statichttprepo.httprangeheader: implement readlines
authorSiddharth Agarwal <sid0@fb.com>
Sun, 17 Nov 2013 13:31:18 -0800
changeset 20055 6bb9de1e4d16
parent 20054 d0789ce427ac
child 20058 5e301ca90b26
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.
mercurial/statichttprepo.py
--- 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