mercurial/util.py
changeset 4134 9dc64c8414ca
parent 4098 c08b6af023bc
parent 4129 e817c68edfed
child 4195 b5d1eaade333
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -790,6 +790,14 @@ if os.name == 'nt':
                 if inst.errno != 0: raise
                 self.close()
                 raise IOError(errno.EPIPE, 'Broken pipe')
+                
+        def flush(self):
+            try:
+                return self.fp.flush()
+            except IOError, inst:
+                if inst.errno != errno.EINVAL: raise
+                self.close()
+                raise IOError(errno.EPIPE, 'Broken pipe')
 
     sys.stdout = winstdout(sys.stdout)