Merge lp:~bialix/bzr-tiplog/win32-tty into lp:bzr-tiplog

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: 25
Proposed branch: lp:~bialix/bzr-tiplog/win32-tty
Merge into: lp:bzr-tiplog
Diff against target: 21 lines (+5/-0)
1 file modified
commands.py (+5/-0)
To merge this branch: bzr merge lp:~bialix/bzr-tiplog/win32-tty
Reviewer Review Type Date Requested Status
Brian de Alwis Approve
Review via email: mp+78246@code.launchpad.net

Description of the change

Windows-specific fix to make sure output is properly formatted without extra blank lines.

To post a comment you must log in.
Revision history for this message
Brian de Alwis (slyguy) wrote :

Ugh. I've merged your change, but I wonder if this shouldn't be put into bzrlib.osutils.terminal_width instead.

Revision history for this message
Brian de Alwis (slyguy) :
review: Approve
Revision history for this message
Alexander Belchenko (bialix) wrote :

Brian de Alwis пишет:
> Ugh. I've merged your change, but I wonder if this shouldn't be put into bzrlib.osutils.terminal_width instead.

I really don't know. I've raised that problem some time ago at Bazaar
sprint, but there was no conclusion.

--
All the dude wanted was his rug back

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commands.py'
2--- commands.py 2011-10-04 13:47:16 +0000
3+++ commands.py 2011-10-05 12:50:27 +0000
4@@ -16,6 +16,7 @@
5
6 """Tiplog specific commands"""
7
8+import sys
9 from bzrlib import (
10 errors,
11 )
12@@ -108,6 +109,10 @@
13 self.tzlocal = None
14
15 self.text_width = terminal_width()
16+ if sys.platform == 'win32':
17+ # on Windows fully filled line will add extra blank line
18+ # so we need to keep one blank character at the end
19+ self.text_width = self.text_width - 1
20
21 tiplog = TipLogger(branch)
22

Subscribers

People subscribed via source and target branches