Show More
@@ -947,10 +947,16 b' class ui(object):' | |||||
947 | else: |
|
947 | else: | |
948 | self._buffers[-1].extend(args) |
|
948 | self._buffers[-1].extend(args) | |
949 | else: |
|
949 | else: | |
950 |
self._writenobuf(self. |
|
950 | self._writenobuf(self.fout, *args, **opts) | |
951 |
|
951 | |||
952 |
def _writenobuf(self, |
|
952 | def _writenobuf(self, dest, *args, **opts): | |
953 | self._progclear() |
|
953 | self._progclear() | |
|
954 | if dest is self.fout: | |||
|
955 | write = self._write | |||
|
956 | elif dest is self.ferr: | |||
|
957 | write = self._write_err | |||
|
958 | else: | |||
|
959 | raise error.ProgrammingError('unsupported file to write') | |||
954 | msg = b''.join(args) |
|
960 | msg = b''.join(args) | |
955 |
|
961 | |||
956 | # opencode timeblockedsection because this is a critical path |
|
962 | # opencode timeblockedsection because this is a critical path | |
@@ -979,7 +985,7 b' class ui(object):' | |||||
979 | if self._bufferstates and self._bufferstates[-1][0]: |
|
985 | if self._bufferstates and self._bufferstates[-1][0]: | |
980 | self.write(*args, **opts) |
|
986 | self.write(*args, **opts) | |
981 | else: |
|
987 | else: | |
982 |
self._writenobuf(self. |
|
988 | self._writenobuf(self.ferr, *args, **opts) | |
983 |
|
989 | |||
984 | def _write_err(self, data): |
|
990 | def _write_err(self, data): | |
985 | try: |
|
991 | try: | |
@@ -1343,7 +1349,7 b' class ui(object):' | |||||
1343 | if not self.interactive(): |
|
1349 | if not self.interactive(): | |
1344 | self.write(msg, ' ', default or '', "\n") |
|
1350 | self.write(msg, ' ', default or '', "\n") | |
1345 | return default |
|
1351 | return default | |
1346 |
self._writenobuf(self. |
|
1352 | self._writenobuf(self.fout, msg, label='ui.prompt') | |
1347 | self.flush() |
|
1353 | self.flush() | |
1348 | try: |
|
1354 | try: | |
1349 | r = self._readline() |
|
1355 | r = self._readline() |
General Comments 0
You need to be logged in to leave comments.
Login now