Suggested fix lp:#213718 (bazaar pager)
d.vedder at web.de
Sun Apr 12 20:04:54 UTC 2015
OK, I added the BZR_PAGER variable and figured out how to auto-adjust
the pager-threshold. Along the way I discovered an undocumented variable
BZR_COLUMNS from osutil.py, so I added a documentation entry for it.
@Richard: I couldn't exactly change my previous code to match your
suggestions, because Python doesn't seem to support variable assignment
inside a test condition:
+ start = 0
+ while (start = text.find("\n", start)+1) > 0: # gives an error
+ number_of_lines = number_of_lines + 1
Otherwise, I implemented your suggestions.
You will find the newest diff in the attachment (relative to the main
branch). I would appreciate it if some people would try it out, it
worked for me, but perhaps I missed something.
On 12.04.2015 07:41, Richard Wilbur wrote:
> @Joshua: Thanks for clearing the air regarding stacked branches.
> Thank you also for the link to the blog post--interesting and
> informative reading. I'm glad for the good architectural choices of
> the past.
> @Daniel: My initial inclination would be to make pager-threshold
> configurable rather than hard coding it. We could use 23 for the
> default value.
> Self-adjusting pager-threshold would be another interesting direction.
> What about querying to see if we are on a terminal and then, if so,
> querying how tall the terminal is?
> I would also vote for BZR_PAGER environment variable support to
> provide a more consistent public interface.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10014 bytes
Desc: not available
More information about the bazaar