Bazaar pqm supports 'rio' requests

John A Meinel john at arbash-meinel.com
Fri Feb 24 22:14:56 GMT 2006


Robert Collins wrote:
> 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

Sure. The individual Command objects decide how much input they want to
consume. So we could have a "multi-command" command, which would run N
times, and build up a set of operations.

John
=:->


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


More information about the bazaar mailing list