command that batches bzr and qbzr commands
John Arbash Meinel
john at arbash-meinel.com
Mon Jul 26 16:55:08 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Gliwinski wrote:
> Hi all,
>
> Is there an easy way to "batch" several other bzr or qbzr commands within a
> plugin command?
>
> Basically an example of what I'm trying to do is write a command which
> downloads some files, imports them (like bzrtools' import) and then launches a
> qcommit dialog pre-filled with certain message and author, etc.
>
> We use this to support ongoing development while the applications are being
> migrated to bzr (from just unversioned code running on the servers).
>
> The question of batching commands though is something I've been meaning to ask
> regardless. Basically sometimes you don't need to dive into lower-level APIs
> when all you need is to batch functionality already encapsulated in CLI cmd_
> classes. But basically is OK to run commands in cmd_ classes from another
> cmd_ class?
>
> Thanks,
> Michael
>
>
Many plugins already do this. You may want to look at some of them,
because sometimes the setup rules have been a bit unclear. (Some setup
code expected run_argv_aliases() to be called, which usually doesn't
happen when running from another command). However that might have been
sorted out.
That said, if there isn't an internal api to do the things you want to
do at the Command level, we consider that a bug. The commands should be
just a command-line glue to get you into domain objects (Branch, etc).
I'll also note that Command level interaction means re-opening branches,
etc, and I don't think that will allow connections to be held open. So
you may end up with multiple ssh handshakes.
Short answer: yes you can do it, but we'd like to know why you want/need to.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxNr9wACgkQJdeBCYSNAAPvbgCeIA+GbaOQgasbKOENKeygALxd
W+gAoJYxDOct+BXNaOykfryHrOJpMp9A
=zvec
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list