Garbage in "bzr commit" output

John Arbash Meinel john at arbash-meinel.com
Sat Jul 8 16:54:54 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> Aaron Bentley wrote:
>>>>> The garbage is just a
>>>>> symptom of the fact that tty progress bars are still active.
>>> Well, not just that. Because right now any note/info/etc will call out
>>> to the ui layer, which will call progress.clear()
>>> So I think this is necessary anyway, to prevent 10 note() calls in a row
>>> from falsely clearing the terminal 10 times.
> 
> If the active progress bar isn't a TTYProgressBar, your change has no
> effect, so if tty progress bars are not active, it can't be necessary.
> 
> I'm in favour of it going in.  It reduces the bandwidth used when
> running bzr in a remote shell.
> 
>>> That said, which do you prefer, and ENV variable, or a global command to
>>> disable progress bars?
> 
> I prefer an env variable, because it applies to child processes (e.g.
> running bzr in a commit hook or as part of a script).
> 
>>> Oh, and I believe I wrote a patch a long time ago, so that we at least
>>> switch to DotsProgressBar if the output isn't a tty.
> 
> Oh, I thought you posted something in the past week.
> 
>>> Anyway, what do you think of the patch? Wait until we can globally
>>> disable it first? If we can decide which way we want to go to disable
>>> it, I'm fine with implementing it.
> 
> Part 1 looks fine.  For 2, I don't think we need to do it in show_eta,
> since that can't increase the # of last_updates there.  We just need it
> in throttle.
> 
> I assume switching from deque to list was an efficiency thing?
> 
> Aaron

I didn't know about list[:] = list[1:2] at the time.
So I thought the only way to trim it without losing the variable was
'popleft' on a deque.
I would have left it a deque (though it doesn't need to be), but deque
doesn't support negative indicies. Such as x[-10:]
And the error it gives is crappy (indicies must be integers... It *is*
an integer, wtf???)

My understanding is also that list/dict are the fastest things in
python. So as long as you aren't abusing them (list.pop(0) all the
time), you are better off using them, versus any other class.

Anyway, I can certainly finish fixing it up, and propose it again.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEr9VOJdeBCYSNAAMRAp/jAJ4whI8HKZleo/NOITPjbRnDZkoCOgCfUg9z
IixCqPwUmRlNwD6tbJtpanw=
=mOiS
-----END PGP SIGNATURE-----




More information about the bazaar mailing list