diff -r e7d3b509af8b -r 08a0f04b56bd mercurial/windows.py --- a/mercurial/windows.py Mon Jan 25 00:05:22 2010 -0600 +++ b/mercurial/windows.py Mon Jan 25 00:05:27 2010 -0600 @@ -47,7 +47,8 @@ self.fp.write(s[start:end]) start = end except IOError, inst: - if inst.errno != 0: raise + if inst.errno != 0: + raise self.close() raise IOError(errno.EPIPE, 'Broken pipe') @@ -55,7 +56,8 @@ try: return self.fp.flush() except IOError, inst: - if inst.errno != errno.EINVAL: raise + if inst.errno != errno.EINVAL: + raise self.close() raise IOError(errno.EPIPE, 'Broken pipe') @@ -333,7 +335,7 @@ hStdOutput = None hStdError = None wShowWindow = subprocess.SW_HIDE - + args = subprocess.list2cmdline(args) # Not running the command in shell mode makes python26 hang when # writing to hgweb output socket.