Show More
@@ -68,22 +68,22 b' verify 7e7d56fe4833 (encoding fallback i' | |||
|
68 | 68 | > self._file = stdout |
|
69 | 69 | > |
|
70 | 70 | > def write(self, data): |
|
71 | > if data == '47\n': | |
|
71 | > if data == b'47\n': | |
|
72 | 72 | > # latin1 encoding is one %xx (3 bytes) shorter |
|
73 | > data = '44\n' | |
|
74 | > elif data.startswith('%C3%A6 '): | |
|
73 | > data = b'44\n' | |
|
74 | > elif data.startswith(b'%C3%A6 '): | |
|
75 | 75 | > # translate to latin1 encoding |
|
76 | > data = '%%E6 %s' % data[7:] | |
|
76 | > data = b'%%E6 %s' % data[7:] | |
|
77 | 77 | > self._file.write(data) |
|
78 | 78 | > |
|
79 | 79 | > def __getattr__(self, name): |
|
80 | 80 | > return getattr(self._file, name) |
|
81 | 81 | > |
|
82 | > sys.stdout = StdoutWrapper(sys.stdout) | |
|
83 | > sys.stderr = StdoutWrapper(sys.stderr) | |
|
82 | > sys.stdout = StdoutWrapper(getattr(sys.stdout, 'buffer', sys.stdout)) | |
|
83 | > sys.stderr = StdoutWrapper(getattr(sys.stderr, 'buffer', sys.stderr)) | |
|
84 | 84 | > |
|
85 | 85 | > myui = ui.ui.load() |
|
86 | > repo = hg.repository(myui, 'a') | |
|
86 | > repo = hg.repository(myui, b'a') | |
|
87 | 87 | > commands.serve(myui, repo, stdio=True, cmdserver=False) |
|
88 | 88 | > EOF |
|
89 | 89 | $ echo baz >> b/foo |
General Comments 0
You need to be logged in to leave comments.
Login now