~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
37
37
 
38
38
""")
39
39
 
 
40
from bzrlib.osutils import watch_sigwinch
 
41
 
40
42
from bzrlib.ui import (
41
43
    UIFactory,
42
44
    NullProgressView,
60
62
        self.stderr = stderr
61
63
        # paints progress, network activity, etc
62
64
        self._progress_view = self.make_progress_view()
63
 
        
 
65
        # hook up the signals to watch for terminal size changes
 
66
        watch_sigwinch()
 
67
 
64
68
    def be_quiet(self, state):
65
69
        if state and not self._quiet:
66
70
            self.clear_term()
238
242
            warnings.warn("%r updated but no tasks are active" %
239
243
                (task,))
240
244
        elif task != self._task_stack[-1]:
241
 
            warnings.warn("%r is not the top progress task %r" %
242
 
                (task, self._task_stack[-1]))
 
245
            # We used to check it was the top task, but it's hard to always
 
246
            # get this right and it's not necessarily useful: any actual
 
247
            # problems will be evident in use
 
248
            #warnings.warn("%r is not the top progress task %r" %
 
249
            #     (task, self._task_stack[-1]))
 
250
            pass
243
251
        self._progress_view.show_progress(task)
244
252
 
245
253
    def _progress_all_finished(self):