Using loggerhead with the same URL as an bzr+http repository

Jelmer Vernooij jelmer at samba.org
Wed Dec 10 11:14:20 GMT 2008


On Wed, 2008-12-10 at 11:52 +0100, Lionel Dricot wrote:
> That was exactly my conclusion. Then, after 3 hours of trying, I gave
> up (I might not be skilled enough in mod_rewrite. This is always very
> painful for me).
> 
> Then, this morning, I had an alternative idea : redirect only what is
> useful to loggerhead to another directory called bzr2 and this one
> will proxy loggerhead.
> 
> My solution :

> Options Indexes FollowSymLinks
> RewriteEngine On
> 
> #Bzr smart-server
> RewriteBase /bzr
> RewriteRule ^(.*/|)\.bzr/smart$ /bzr/bzr-smart.py [L]
> 
> #Redirect the main page to loggerhead
> RewriteRule ^bzr/$ /bzr2/ [L]
> #redirect each project to loggergead
> RewriteRule ^bzr/([0-9a-zA-Z_\-]*)/$ /bzr2/adev/$1 [L]
> # Loggerhead proxies.
> RewriteRule ^bzr2/(.*)$ http://localhost:8080/$1 [L,P]


Is there any reason loggerhead couldn't just be set up to
provide .bzr/smart and call the smart server ? That would make this work
out of the box, and save everybody the trouble of setting this up.

Cheers,

Jelmer

> It seems to work fine. The only drawback is that url in loggerhead are
> not pretty : they use bzr2// (yes, with double slash). But it's
> functionnal.
> 
> On Tue, Dec 9, 2008 at 5:50 PM, Matt Nordhoff
> <mnordhoff at mattnordhoff.com> wrote:
>         
>         Lionel Dricot wrote:
>         > Hello,
>         >
>         > I'm using my bzr+http repository in a subfolder of my
>         server. (
>         > http://server/bzr/ ) Unfortunatly, I cannot add a
>         virtualhost (this is
>         > on an intranet and I don't have the right to add a
>         subdomain).
>         > The branches are physically located in /server/www/bzr/ as
>         subfolder.
>         > I also have loggerdhead running on http://server:8080/
>         >
>         > I want to have loggerhead available on http://server/bzr/
>         >
>         > I'm a bit lost with mod_proxy and I want to keep the
>         > branching/push/pulling on the same address than the
>         loggerhead interface
>         > (to not confuse my users)
>         >
>         > How can I do that ? Is there anybody with a similar setup ?
>         >
>         > I thought that
>         http://live.gnome.org/DistributedSCM/BazaarPlayground
>         > would help but it happens that nothing work for me on this
>         page.
>         >
>         > Thanks in advance,
>         >
>         > Lionel
>         
>         
>         Actually, the config sample on that page does show how to do
>         it: You
>         need to configure your web server like this:
>         
>         * Send requests ending with "/.bzr/smart" to the smart server.
>         * All other requests containing "/.bzr/" or ending with
>         "/.bzr" should
>         be handled like any other static file.
>         * Send all other requests to Loggerhead.
>         
>         How you configure that is another matter. That gnome page
>         shows how for
>         Apache; anyway, it should be a pretty simple matter.
>         --

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081210/fa536b19/attachment-0001.pgp 


More information about the bazaar mailing list