Bazaar pqm supports 'rio' requests

John A Meinel john at arbash-meinel.com
Fri Feb 24 21:53:54 GMT 2006


Robert Collins wrote:
> On Thu, 2006-02-23 at 23:42 -0600, John A Meinel wrote:
>> Since I've never worked with the bazaar pqm, I thought I would ask for a
>> quick review of my changes before I do too much work. I haven't really
>> tested it, I just wanted to get a feel for the code flow of pqm.
>>
>> Attached is the patch, but the branch is also available here:
> 
> General feel +1.
> 
> Specific issues:
>  - All new code in PQM I add tests for - pqm/tests/*.py and
> pqm/ui/tests/*.py.

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

>  - I want to decouple the parsing of scripts and the execution, your
> patch doesn't really make this easier or harder, but what I have
> mentally planned is that the Script will stop owning the input, instead
> we will create a sequence of commands and then execute them in series.

Would you be happier if the script parser created Command objects? What
I have in mind is that we have a base-level Command interface, with
'run' or whatever. Then each child registers itself to handle a specific
type of request.

Then the ScriptParser would read in the lines (after validating the
message), and maintain the same queue that I have now.

When a line matches a Command's key (probably a regex), then that
Command is instantiated along with the queue of lines. For rio commands,
there would be another set of registered Commands, which would take an
rio stanza, rather than taking a plain set of lines.

When finished, ScriptParser will have a set of Commands to be run. And
it can just iterate through them. This also has the advantage that the
script is fully parsed before it is started. So that a bogus line in the
middle won't have run a bunch of operations, that ultimately will fail.

> 
> There are a couple of features tied into this:
> One is to be able to accept two merge requests in a row and then run a
> single regression test run and finally commit to both branches. Again,
> your patch doesn't make this harder or easier - but I wanted you to be
> aware of where PQM is headed, so that if you are debating where to put
> stuff, its predictable :0.
> 
> Rob
> 

Are you thinking that you would submit a merge request for say a program
and its library?

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'.

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/1e1bad43/attachment.pgp 


More information about the bazaar mailing list