~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

 * bzr add now lists how many files were ignored per glob.  add --verbose
   lists the specific files.  (Aaron Bentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
                 show_spinner=False,
70
70
                 show_eta=True,
71
71
                 show_bar=True,
72
 
                 show_count=True,
73
 
                 to_messages_file=sys.stdout):
 
72
                 show_count=True):
74
73
        object.__init__(self)
75
74
        self.to_file = to_file
76
 
        self.to_messages_file = to_messages_file
 
75
 
77
76
        self.last_msg = None
78
77
        self.last_cnt = None
79
78
        self.last_total = None
83
82
        self.show_bar = show_bar
84
83
        self.show_count = show_count
85
84
 
86
 
    def note(self, fmt_string, *args, **kwargs):
87
 
        """Record a note without disrupting the progress bar."""
88
 
        self.clear()
89
 
        self.to_messages_file.write(fmt_string % args)
90
 
        self.to_messages_file.write('\n')
91
85
 
92
86
 
93
87
class DummyProgress(_BaseProgressBar):
104
98
    def clear(self):
105
99
        pass
106
100
        
107
 
    def note(self, fmt_string, *args, **kwargs):
108
 
        """See _BaseProgressBar.note()."""
109
 
 
110
 
 
 
101
    
111
102
class DotsProgressBar(_BaseProgressBar):
112
103
    def __init__(self, **kwargs):
113
104
        _BaseProgressBar.__init__(self, **kwargs)
264
255
        self.to_file.write('\r' + m.ljust(self.width - 1))
265
256
        #self.to_file.flush()
266
257
            
 
258
 
267
259
    def clear(self):        
268
260
        self.to_file.write('\r%s\r' % (' ' * (self.width - 1)))
269
261
        #self.to_file.flush()        
 
262
    
270
263
 
271
264
        
272
265
def str_tdelta(delt):