Show More
@@ -134,12 +134,16 b' def hook(ui, repo, name, throw=False, **' | |||
|
134 | 134 | |
|
135 | 135 | oldstdout = -1 |
|
136 | 136 | if _redirect: |
|
137 | try: | |
|
137 | 138 | stdoutno = sys.__stdout__.fileno() |
|
138 | 139 | stderrno = sys.__stderr__.fileno() |
|
139 | 140 | # temporarily redirect stdout to stderr, if possible |
|
140 | 141 | if stdoutno >= 0 and stderrno >= 0: |
|
141 | 142 | oldstdout = os.dup(stdoutno) |
|
142 | 143 | os.dup2(stderrno, stdoutno) |
|
144 | except AttributeError: | |
|
145 | # __stdout/err__ doesn't have fileno(), it's not a real file | |
|
146 | pass | |
|
143 | 147 | |
|
144 | 148 | try: |
|
145 | 149 | for hname, cmd in ui.configitems('hooks'): |
General Comments 0
You need to be logged in to leave comments.
Login now