On Tue, Dec 21, 2010 at 4:50 PM, Oz Linden (Scott Lawrence)
<o...@lindenlab.com> wrote:
> On 2010-12-21 18:18, Christian Hammond wrote:
>>
>> There's a --repository-url parameter for post-review that can specify
>> which repository you want to match on the server. It doesn't look like
>> the Mercurial support in post-review handles this parameter, but it
>> wouldn't take much to patch that if you wanted to play around with it
>> and contribute a fix
>
> I actually was thinking that I'd try to do a patch that adds a
> --repository-name parameter to post-review, which could then use the web api
> to translate the name into the url.   This would avoid the problems with
> trailing slashes and scheme differences, and would match the web UI where
> the poster selects a repo name not a URL.

Yeah, I'd be fine with that. You can probably make use of the
get_repositories call inside post-review to implement this.

If you end up having to do anything with the API, though, then there's
a couple things to note. If not, just consider this an informative
brain dump :)

First, there are two APIs today: the old Review Board 1.0 API, and the
new REST one in RB 1.5.

Today, post-review uses the RB 1.0 API only. I have a chance pending,
which needs some additional work done first, that will update
post-review to use either API, depending on what version of the server
it's talking to.

The old API is going away in 1.6.

So if you did have to touch the API for your needs, then what I'd
recommend is to wait for my new change to land in post-review (ideally
within the week or so -- holidays will undoubtedly get in the way) and
then implement the server-side part using the new API.

Certainly, having some method to quickly query by name on the server
will be more scalable than the get_repositories call, as large servers
with many repositories could result in large amounts of data being
downloaded/parsed, and in the case of the new API, multiple requests
to handle the pagination.

Christian

--
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to