changeset 2243:caf2c6ef5b0e

The posixfile implemented using the win32 API should be iterable.
author Christian Boos <cboos@neuf.fr>
date Wed, 10 May 2006 11:53:56 +0200
parents 78ab05ef1339
children 76be4e66ddc8 3fd603eb6add
files mercurial/util_win32.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util_win32.py	Tue May 09 20:56:57 2006 -0700
+++ b/mercurial/util_win32.py	Wed May 10 11:53:56 2006 +0200
@@ -220,6 +220,10 @@
         self.name = name
         self.mode = mode
 
+    def __iter__(self):
+        for line in self.read().splitlines(True):
+            yield line
+
     def read(self, count=-1):
         try:
             cs = cStringIO.StringIO()