##// END OF EJS Templates
ui: consolidate places where _progclear() is called...
Yuya Nishihara -
r40554:3c4b9dac default
parent child Browse files
Show More
@@ -950,6 +950,7 b' class ui(object):'
950 self._writenobuf(*args, **opts)
950 self._writenobuf(*args, **opts)
951
951
952 def _writenobuf(self, *args, **opts):
952 def _writenobuf(self, *args, **opts):
953 self._progclear()
953 if self._colormode == 'win32':
954 if self._colormode == 'win32':
954 # windows color printing is its own can of crab, defer to
955 # windows color printing is its own can of crab, defer to
955 # the color module and that is it.
956 # the color module and that is it.
@@ -962,7 +963,6 b' class ui(object):'
962 self._write(*msgs, **opts)
963 self._write(*msgs, **opts)
963
964
964 def _write(self, *msgs, **opts):
965 def _write(self, *msgs, **opts):
965 self._progclear()
966 # opencode timeblockedsection because this is a critical path
966 # opencode timeblockedsection because this is a critical path
967 starttime = util.timer()
967 starttime = util.timer()
968 try:
968 try:
@@ -974,10 +974,11 b' class ui(object):'
974 (util.timer() - starttime) * 1000
974 (util.timer() - starttime) * 1000
975
975
976 def write_err(self, *args, **opts):
976 def write_err(self, *args, **opts):
977 self._progclear()
978 if self._bufferstates and self._bufferstates[-1][0]:
977 if self._bufferstates and self._bufferstates[-1][0]:
979 self.write(*args, **opts)
978 self.write(*args, **opts)
980 elif self._colormode == 'win32':
979 return
980 self._progclear()
981 if self._colormode == 'win32':
981 # windows color printing is its own can of crab, defer to
982 # windows color printing is its own can of crab, defer to
982 # the color module and that is it.
983 # the color module and that is it.
983 color.win32print(self, self._write_err, *args, **opts)
984 color.win32print(self, self._write_err, *args, **opts)
General Comments 0
You need to be logged in to leave comments. Login now