# HG changeset patch # User Idan Kamara # Date 2011-07-16 12:24:28 # Node ID d2d592718e907d62ad95f4360211061bcfb5c643 # Parent a59058fd074a8ed5020ce81003b0cebf2df44274 win32: assign winstdout to sys.__stdout__ as well (issue2888) On Windows sys.stdout was being replaced with winstdout, which caused util.system() to redirect its output (due to 406b6d7bdcb9). That causes interactive tools (such as vim) to stop working. diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -62,7 +62,7 @@ class winstdout(object): self.close() raise IOError(errno.EPIPE, 'Broken pipe') -sys.stdout = winstdout(sys.stdout) +sys.__stdout__ = sys.stdout = winstdout(sys.stdout) def _is_win_9x(): '''return true if run on windows 95, 98 or me.'''