~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-06 19:54:45 UTC
  • mfrom: (5050.3.21 2.2-final)
  • mto: This revision was merged to the branch mainline in revision 5371.
  • Revision ID: john@arbash-meinel.com-20100806195445-7vsjls3uf8o6t7kt
Merge the 2.2-final branch into trunk, in preparation for release.

Had to fix up one NEWS entry that accidentally got merged into the 2.2 section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
        # we need one extra space for terminals that wrap on last char
305
305
        w = osutils.terminal_width() 
306
306
        if w is None:
307
 
            return w
 
307
            return None
308
308
        else:
309
309
            return w - 1
310
310
 
311
311
    def _show_line(self, s):
 
312
        # sys.stderr.write("progress %r\n" % s)
 
313
        width = self._avail_width()
 
314
        if width is not None:
 
315
            s = '%-*.*s' % (width, width, s)
312
316
        self._term_file.write('\r' + s + '\r')
313
317
 
314
318
    def clear(self):