Direction character on new progress bar

Martin Pool mbp at sourcefrog.net
Wed Mar 18 23:39:58 GMT 2009


2009/3/18 Matthieu Moy <Matthieu.Moy at imag.fr>:
> Jonathan Gossage <jgossage at gmail.com> writes:
>
>> Anyone who is used to shell programming should be comfortable with < for
>> read and > for write.
>
> Yes, but "read" and "write" to what? Actually, it's more a matter of
> download Vs upload if I understand correctly. Download means "read"
> from server, and "write" locally, so it actually does both.

> For example:
>
>  wget blablabla -O- > some-file.txt
>
> does a download, and does so with a '>', which is a "write" for the
> shell. (Again, if my understanding is correct), the bzr progress bar
> uses the '>' the same way my wget shell command does.

If we're downloading from an http server to disk similarly to your
example then we'll be reading from an HttpTransport and writing to a
LocalTransport.  At the moment, LocalTransports don't give any
activity notifications, so you'll just see the http activity as a
read.

If we just fired activity from local transports without changing
anything else then they would fight about which direction to show, and
the measured rate would be twice what it should be.

In general local files will be much faster than network activity, and
purely local activities should generally be showing progress bars that
update reasonably fast.   However there might be some cases where
showing the local IO rate would be interesting.  I was going to leave
it for now.  (But patches are always welcome...)

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list