~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-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                 stderr=None):
49
49
        """Create a TextUIFactory.
50
50
 
51
 
        :param bar_type: The type of progress bar to create. It defaults to 
 
51
        :param bar_type: The type of progress bar to create. It defaults to
52
52
                         letting the bzrlib.progress.ProgressBar factory auto
53
53
                         select.   Deprecated.
54
54
        """
63
63
    def prompt(self, prompt):
64
64
        """Emit prompt on the CLI."""
65
65
        self.stdout.write(prompt)
66
 
        
 
66
 
67
67
    def clear_term(self):
68
68
        """Prepare the terminal for output.
69
69
 
72
72
        # XXX: If this is preparing to write to stdout, but that's for example
73
73
        # directed into a file rather than to the terminal, and the progress
74
74
        # bar _is_ going to the terminal, we shouldn't need
75
 
        # to clear it.  We might need to separately check for the case of 
 
75
        # to clear it.  We might need to separately check for the case of
76
76
        self._progress_view.clear()
77
77
 
78
78
    def note(self, msg):
82
82
 
83
83
    def report_transport_activity(self, transport, byte_count, direction):
84
84
        """Called by transports as they do IO.
85
 
        
 
85
 
86
86
        This may update a progress bar, spinner, or similar display.
87
87
        By default it does nothing.
88
88
        """
102
102
 
103
103
class TextProgressView(object):
104
104
    """Display of progress bar and other information on a tty.
105
 
    
106
 
    This shows one line of text, including possibly a network indicator, spinner, 
 
105
 
 
106
    This shows one line of text, including possibly a network indicator, spinner,
107
107
    progress bar, message, etc.
108
108
 
109
109
    One instance of this is created and held by the UI, and fed updates when a
207
207
 
208
208
    def show_transport_activity(self, byte_count):
209
209
        """Called by transports as they do IO.
210
 
        
 
210
 
211
211
        This may update a progress bar, spinner, or similar display.
212
212
        By default it does nothing.
213
213
        """