Merge lp://staging/~mbp/bzr/transport-activity into lp://staging/~bzr/bzr/trunk-old

Proposed by Martin Pool
Status: Merged
Approved by: Ian Clatworthy
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~mbp/bzr/transport-activity
Merge into: lp://staging/~bzr/bzr/trunk-old
Diff against target: 47 lines
To merge this branch: bzr merge lp://staging/~mbp/bzr/transport-activity
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+7792@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

This stops progress bars showing the active transport scheme/protocol, and the direction of IO, therefore saving a bit of space for other uses.

Revision history for this message
Ian Clatworthy (ian-clatworthy) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-06-23 09:05:52 +0000
3+++ NEWS 2009-06-24 02:35:30 +0000
4@@ -62,6 +62,9 @@
5 * Unshelve works correctly when multiple zero-length files are present on
6 the shelf. (Aaron Bentley, #363444)
7
8+* Progress bars no longer show the network transport scheme or direction.
9+ (Martin Pool)
10+
11 Internals
12 *********
13
14
15=== modified file 'bzrlib/ui/text.py'
16--- bzrlib/ui/text.py 2009-06-17 05:03:18 +0000
17+++ bzrlib/ui/text.py 2009-06-24 02:35:30 +0000
18@@ -138,6 +138,7 @@
19 # true when there's output on the screen we may need to clear
20 self._have_output = False
21 # XXX: We could listen for SIGWINCH and update the terminal width...
22+ # https://launchpad.net/bugs/316357
23 self._width = osutils.terminal_width()
24 self._last_transport_msg = ''
25 self._spin_pos = 0
26@@ -254,19 +255,10 @@
27 # guard against clock stepping backwards, and don't update too
28 # often
29 rate = self._bytes_since_update / (now - self._transport_update_time)
30- scheme = getattr(transport, '_scheme', None) or repr(transport)
31- if direction == 'read':
32- dir_char = '>'
33- elif direction == 'write':
34- dir_char = '<'
35- else:
36- dir_char = ' '
37- msg = ("%.7s %s %6dKB %5dKB/s" %
38- (scheme, dir_char, self._total_byte_count>>10, int(rate)>>10,))
39+ msg = ("%6dKB %5dKB/s" %
40+ (self._total_byte_count>>10, int(rate)>>10,))
41 self._transport_update_time = now
42 self._last_repaint = now
43 self._bytes_since_update = 0
44 self._last_transport_msg = msg
45 self._repaint()
46-
47-