~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-26 02:35:05 UTC
  • mfrom: (4470.3.2 transport-activity)
  • Revision ID: pqm@pqm.ubuntu.com-20090626023505-qxubv38s4gmcsp3a
(mbp) remove transport protocol and direction from progress bars

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        # true when there's output on the screen we may need to clear
139
139
        self._have_output = False
140
140
        # XXX: We could listen for SIGWINCH and update the terminal width...
 
141
        # https://launchpad.net/bugs/316357
141
142
        self._width = osutils.terminal_width()
142
143
        self._last_transport_msg = ''
143
144
        self._spin_pos = 0
254
255
            # guard against clock stepping backwards, and don't update too
255
256
            # often
256
257
            rate = self._bytes_since_update / (now - self._transport_update_time)
257
 
            scheme = getattr(transport, '_scheme', None) or repr(transport)
258
 
            if direction == 'read':
259
 
                dir_char = '>'
260
 
            elif direction == 'write':
261
 
                dir_char = '<'
262
 
            else:
263
 
                dir_char = ' '
264
 
            msg = ("%.7s %s %6dKB %5dKB/s" %
265
 
                    (scheme, dir_char, self._total_byte_count>>10, int(rate)>>10,))
 
258
            msg = ("%6dKB %5dKB/s" %
 
259
                    (self._total_byte_count>>10, int(rate)>>10,))
266
260
            self._transport_update_time = now
267
261
            self._last_repaint = now
268
262
            self._bytes_since_update = 0
269
263
            self._last_transport_msg = msg
270
264
            self._repaint()
271
 
 
272