For one, I would be interested. We use Bazaar and and have been slowly
trying to intergrate ReviewBoard in our system. I looked into the
post-review and it does not seem to support Bazaar. I have already
extended it using the Mercurial example and override two or three
methods that the Mercurial component did.

I plan to soon post my changes for Bazaar once I can verify that my
code actually works :)

On Tue, Jun 2, 2009 at 1:56 PM, Chris Clark <> wrote:
> If you want to deploy post-review with some site specific customizations
> (e.g. add support for a custom in house SCM) there are only a few options:
>    * Privately fork post-review and try and sync all the changes that
>      occur in "trunk" into your version
>    * add a wrapper script around post-review, e.g. rename post-review
>      to (python does not allow hypens "-" in
>      module/library names), import postreview in your tool and then
>      monkey patch in your changes. The rename can be handled in
> when "building"
> Neither solution is optimal but this is the price you pay if you want
> private custom versions :-(
> I don't have a solution to the above but I have some ideas on making it
> suck slightly less by making either option easier to deal with. For
> instance take the case where one needs to add in support for a custom
> SCM. You need to add a new class (subclassed from SCMClient) and then
> modify determine_client() to add it to the list of SCM's.
>    * With the forked approach you have to edit determine_client().
>    * With the wrapper approach you have to copy the existing
>      determine_client() into your wrapper, modify it then monkey patch
>      the original.
> Either way you have to be prepared to follow the trunk version in case
> determine_client() changes.
> What do people think of the following ideas:
> 1) move the tuple of SCM clients into a global variable.
> E.g. instead of:
>    # Try to find the SCM Client we're going to be working with.
>    for tool in (SVNClient(), CVSClient(), GitClient(), MercurialClient(),
>                 PerforceClient(), ClearCaseClient()):
> Have:
> scm_tuple=(SVNClient(), CVSClient(), GitClient(), MercurialClient(),
>           PerforceClient(), ClearCaseClient())
> ....
> def determine_client():
> ....
>    # Try to find the SCM Client we're going to be working with.
>    for tool in scm_tuple:
> This makes monkey patching the list easier, you just update the global
> from outside.
> 2) modify the trunk version of post-review to change the formatting that
> is used in the tuple (list) of SCM clients to make it easier to edit the
> list. E.g.:
> scm_tuple=(
>    SVNClient(),
>    CVSClient(),
>    GitClient(),
>    MercurialClient(),
>    PerforceClient(),
>    ClearCaseClient(),
>    )
> This makes it easier to modify the code if you decide to fork the
> script. You can re-order, add, or remove very easily. Diffs show up very
> clearly.
> Does this appeal to anyone? #1 above would make my life easier. I wanted
> to get a feel from a wide audience before posting a for patch for review
> where it may not be seen by so many people.
> Chris
> >


You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to