changeset 4129 | e817c68edfed |
parent 4087 | 587c6c652f82 |
child 4134 | 9dc64c8414ca |
child 4178 | 6f9474044736 |
child 4229 | 24c22a3f2ef8 |
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -741,6 +741,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)