lp:~vila/bzr/353370-notty-no-term-width

Created by Vincent Ladeuil on 2009-10-23 and last modified on 2009-12-09
Get this branch:
bzr branch lp:~vila/bzr/353370-notty-no-term-width
Only Vincent Ladeuil can upload to this branch. If you are Vincent Ladeuil please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Vincent Ladeuil
Project:
Bazaar
Status:
Merged

Recent revisions

4762. By Vincent Ladeuil on 2009-12-09

Fix broken test (fail on windows).

* bzrlib/tests/test_osutils.py:
(TestTerminalWidth.test_falls_back_to_COLUMNS): COLUMNS makes
sense for ttys only.

4761. By Vincent Ladeuil on 2009-12-09

Fix parameter order.

* bzrlib/osutils.py:
(_ioctl_terminal_size): bah, use the right order for height, width.

4760. By Vincent Ladeuil on 2009-12-09

More robusts tests for osutils.terminal_width().

* bzrlib/tests/test_osutils.py:
(TestTerminalWidth): Make the tests more robust.

* bzrlib/osutils.py:
(terminal_width): Document the implemented behavior. Delegate the
OS specific part to _terminal_size.
(_ioctl_terminal_size): The unix implementation for
_terminal_size.
(_win32_terminal_size): The windows implementation for
_terminal_size.

4759. By Vincent Ladeuil on 2009-12-09

Merge jam's fix for termios import

4758. By Vincent Ladeuil on 2009-12-04

Re-fix the priority order since there is a known valid case.

* bzrlib/tests/test_osutils.py:
(TestTerminalWidth.test_falls_back_to_COLUMNS): Ensures COLUMNS is
taken into account if BZR_COLUMNS is not set.

* bzrlib/osutils.py:
(terminal_width): COLUMNS takes priority on termios.TIOCGWINSZ as
shown by tests under emacs (on no counter examples are known).

4757. By Vincent Ladeuil on 2009-12-04

merge trunk

4756. By Vincent Ladeuil on 2009-12-04

Fixed as per poolie's review.

4755. By Vincent Ladeuil on 2009-12-02

merge trunk and resolve conflicts to cleanup submission

4754. By Vincent Ladeuil on 2009-12-02

Introduce BZR_COLUMNS since COLUMNS behaviour is too obscure.

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

* bzrlib/tests/__init__.py:
(TestCase._cleanEnvironment): Add BZR_COLUMNS.

* bzrlib/osutils.py:
(terminal_width): BZR_COLUMNS is the official way to override.

4753. By Vincent Ladeuil on 2009-12-02

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.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:bzr
This branch contains Public information 
Everyone can see this information.

Subscribers