~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/chroot.py

terminal_width can now returns None.

* bzrlib/win32utils.py:
(get_console_size): Fix typo in comment.

* bzrlib/ui/text.py:
(TextProgressView._show_line): Handle the no terminal present case.

* bzrlib/tests/test_osutils.py:
(TestTerminalWidth): Update tests.

* bzrlib/tests/blackbox/test_too_much.py:
Fix some imports.
(OldTests.test_bzr): Handle the no terminal present case.

* bzrlib/tests/__init__.py:
(VerboseTestResult.report_test_start): Handle the no terminal
present case.

* bzrlib/status.py:
(show_pending_merges): Handle the no terminal present case.
(show_pending_merges.show_log_message): Factor out some
code. Handle the no terminal present case.

* bzrlib/osutils.py:
(terminal_width): Return None if no precise value can be found.

* bzrlib/log.py:
(LineLogFormatter.__init__): Handle the no terminal present case.
(LineLogFormatter.truncate): Accept None as max_len meaning no
truncation.
(LineLogFormatter.log_string): 

* bzrlib/help.py:
(_help_commands_to_text): Handle the no terminal present case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    def _factory(self, url):
49
49
        return ChrootTransport(self, url)
50
50
 
51
 
    def start_server(self):
 
51
    def setUp(self):
52
52
        self.scheme = 'chroot-%d:///' % id(self)
53
53
        register_transport(self.scheme, self._factory)
54
54
 
68
68
class TestingChrootServer(ChrootServer):
69
69
 
70
70
    def __init__(self):
71
 
        """TestingChrootServer is not usable until start_server is called."""
 
71
        """TestingChrootServer is not usable until setUp is called."""
72
72
        ChrootServer.__init__(self, None)
73
73
 
74
 
    def start_server(self, backing_server=None):
 
74
    def setUp(self, backing_server=None):
75
75
        """Setup the Chroot on backing_server."""
76
76
        if backing_server is not None:
77
77
            self.backing_transport = get_transport(backing_server.get_url())
78
78
        else:
79
79
            self.backing_transport = get_transport('.')
80
 
        ChrootServer.start_server(self)
 
80
        ChrootServer.setUp(self)
81
81
 
82
82
 
83
83
def get_test_permutations():