Show More
@@ -43,6 +43,9 from mercurial import ( | |||
|
43 | 43 | ) |
|
44 | 44 | |
|
45 | 45 | def main(): |
|
46 | # Prevent insertion/deletion of CRs | |
|
47 | dispatch.initstdio() | |
|
48 | ||
|
46 | 49 | cwd = os.getcwd() |
|
47 | 50 | readonly = False |
|
48 | 51 | args = sys.argv[1:] |
@@ -83,7 +83,7 class request(object): | |||
|
83 | 83 | |
|
84 | 84 | def run(): |
|
85 | 85 | "run the command in sys.argv" |
|
86 |
|
|
|
86 | initstdio() | |
|
87 | 87 | req = request(pycompat.sysargv[1:]) |
|
88 | 88 | err = None |
|
89 | 89 | try: |
@@ -112,7 +112,7 def run(): | |||
|
112 | 112 | sys.exit(status & 255) |
|
113 | 113 | |
|
114 | 114 | if pycompat.ispy3: |
|
115 |
def |
|
|
115 | def initstdio(): | |
|
116 | 116 | pass |
|
117 | 117 | |
|
118 | 118 | def _silencestdio(): |
@@ -132,7 +132,7 if pycompat.ispy3: | |||
|
132 | 132 | except IOError: |
|
133 | 133 | pass |
|
134 | 134 | else: |
|
135 |
def |
|
|
135 | def initstdio(): | |
|
136 | 136 | for fp in (sys.stdin, sys.stdout, sys.stderr): |
|
137 | 137 | procutil.setbinary(fp) |
|
138 | 138 |
@@ -798,10 +798,6 class sshserver(object): | |||
|
798 | 798 | hook.redirect(True) |
|
799 | 799 | ui.fout = repo.ui.fout = ui.ferr |
|
800 | 800 | |
|
801 | # Prevent insertion/deletion of CRs | |
|
802 | procutil.setbinary(self._fin) | |
|
803 | procutil.setbinary(self._fout) | |
|
804 | ||
|
805 | 801 | def serve_forever(self): |
|
806 | 802 | self.serveuntil(threading.Event()) |
|
807 | 803 | sys.exit(0) |
General Comments 0
You need to be logged in to leave comments.
Login now