Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util_win32.py @ 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 | 9b42304d9896 |
children | 45aef5ddcdbe |
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()