Bazaar pqm supports 'rio' requests

Robert Collins robertc at robertcollins.net
Fri Feb 24 22:09:07 GMT 2006


On Fri, 2006-02-24 at 15:53 -0600, John A Meinel wrote:


> I saw the directory, but I still haven't found any way to actually *run*
> those tests. Am I missing something?

make check-local runs just those tests.
..
> Are you thinking that you would submit a merge request for say a program
> and its library?

precisely. 
https://launchpad.net/products/pqm/+spec/multi-branch-commits

> I could almost see doing this as a new 'rio' command type. Something
> like 'request: multi-step'.
> 
> I'm not sure if you have a specific interface in mind for the Command
> objects. Perhaps a 'run()' method, that won't actually commit anything
> until the 'success()' method is called. So the 'merge' command can
> happen, but won't automatically commit. That lets you run other
> commands, before you indicate everything was a success.
> 
> Maybe it would be better to call it 'finalize' and 'abort'.

I think the command interface is something like
def run():
    """Run this command.

    If the command fails, a PQMCommandError is
    raised and if possible no changes are committed to disk.
    """


That lets a merge be implemented by
MultiCommand(MergeCommand(source, target), CheckCommand(target),
CommitCommand(target)).run()

and multi branch merging by
MultiCommand(MergeCommand(source, target), MergeCommand(source2,
target2), CheckCommand(target), CommitMultipleCommand(target)).run()

(if you see what I mean).

Yes, I think generating a queue of command objects for the runner to run
is a good approach. Each command should be a composite though - that is
we dont have to map 1 line : 1 command or 1 rio : 1 command, we can
aggregate the actions based on the input to generate the right
behaviour.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060225/9be6fa40/attachment.pgp 


More information about the bazaar mailing list