[RFC] New feature: --batch to accept command sequences from stdin (or file)

John Arbash Meinel john at arbash-meinel.com
Wed Jun 21 18:13:27 BST 2006


Aaron Bentley wrote:
> Jari Aalto+mail.perl wrote:
>>> bzr startup time, as for all interpreted languages (Perl, Python ...)
>>> is quite constly. Especially under Win32/Cygwin it takes 3-5 seconds
>>> before simple "bzr ci" is run under old hardware.
> 
> We're working on reducing the startup time so that it's comparable with
> Hg's.  That's what the recent discussion of "demandload" and "profiling
> imports" was about.  One of the reasons for the new "dirstate" format is
> to avoid having to import ElementTree.

Well, if you look at my demandload stuff, it turns out the only
expensive part of ElementTree is the unicode regex (~34ms). If you delay
compiling that until you actually need it (while writing), you save a
lot of import time.
And if we fix the import time for 'copy', then cElementTree itself only
loads in about 8ms. It is quite fast.

> 
>>> It would be nice if bzr somehow accepted commands to run from 
>>> stdin, from file or command line. Something like:
> 
> There is already the "bzr serve" plugin.  See also the "bzr shell"
> command in bzrtools, for interactive use.
> 
> Aaron

The 'bzr serve' plugin might be a little bit-rotted. But it was simple
enough that it still work. Basically it just launches a background bzr
process which then forks to execute commands. And a C front-end which
just connects to the control fifo's and sends the commands, and prints
out the results.

It could very easily be fixed up to be more secure for actual use
(per-user sockets, with proper filesystem permissions, etc).
It actually makes bzr quite a bit snappier.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060621/736d424c/attachment.pgp 


More information about the bazaar mailing list