Code review comment for lp:~spiv/bzr/no-sigwinch-583941

Revision history for this message
Andrew Bennetts (spiv) wrote :

vila and I have had an extensive discussion on IRC. I'll try to write a comprehensive summary soon, but right now it's dinner time, so here's the short version:

1) I'll rework this patch for 2.1 to preserve the 2.1 behaviour as much as possible without using SIGWINCH (i.e. use COLUMNS until we observe the size from TIOCGWINSZ change), to minimise risk of regressions in 2.1.

2) I'll submit another patch for trunk that I think will be a better implementation of terminal_width: try $BZR_COLUMNS, then TIOCGWINSZ, then $COLUMNS in turn, until we find one that is set to a non-zero value. If none are set non-zero, return None. This patch will try to explicitly document the rationale and problematic cases to take into account, because the literature around determining terminal sizes is pretty confusing.

I'm popping this branch back to work-in-progress for now, but expect a resubmission soon.

« Back to merge proposal