# HG changeset patch # User Christian Boos # Date 1147254836 -7200 # Node ID caf2c6ef5b0e46b222e7f81e6ab6b3c0e6b4b610 # Parent 78ab05ef1339c157973ec09fabd91996d9c41494 The posixfile implemented using the win32 API should be iterable. diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py --- a/mercurial/util_win32.py +++ b/mercurial/util_win32.py @@ -220,6 +220,10 @@ class posixfile(object): 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()