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
=== modified file 'commands.py'
--- commands.py 2011-10-04 13:47:16 +0000
+++ commands.py 2011-10-05 12:50:27 +0000
@@ -16,6 +16,7 @@
1616
17"""Tiplog specific commands"""17"""Tiplog specific commands"""
1818
19import sys
19from bzrlib import (20from bzrlib import (
20 errors,21 errors,
21 )22 )
@@ -108,6 +109,10 @@
108 self.tzlocal = None109 self.tzlocal = None
109110
110 self.text_width = terminal_width()111 self.text_width = terminal_width()
112 if sys.platform == 'win32':
113 # on Windows fully filled line will add extra blank line
114 # so we need to keep one blank character at the end
115 self.text_width = self.text_width - 1
111116
112 tiplog = TipLogger(branch)117 tiplog = TipLogger(branch)
113118

Subscribers

People subscribed via source and target branches