Loggerhead question
Matt Nordhoff
mnordhoff at mattnordhoff.com
Fri Oct 23 13:59:50 BST 2009
Russel Winder wrote:
> Is there a way of setting up Loggerhead with Apache that allows the same
> URL to be used for browsing using a browser and branching using bzr or
> Bazaar Explorer.
>
> I have Loggerhead working fine on xxxx:8080/Bazaar/Project and pointing
> Epiphany at it does everything required. However doing "bzr info
> xxxx:8080/Bazaar/Project" gives the "not a branch" error.
>
> Thanks.
You can configure Apache to handle requests with "/.bzr/" in them itself
instead of passing them to Loggerhead.
Or, Loggerhead supports serving branches over HTTP, over both the dumb
and smart servers. Maybe your Loggerhead is too old for that?
Be aware that, up until very recent revisions of bzr.dev and
Loggerhead's trunk, there were problems serving branches in shared repos
over the smart server. (Though you'd get a different error message than
"not a branch". Something about a "jailbreak" if you're hitting the bzr
bug, or IIRC "no repository present" if you're hitting the Loggerhead bug.)
If you can't upgrade to fixed versions, you can work around the bugs by
using "nosmart+http" URLs to make bzr only use the dumb server.
If you can upgrade Loggerhead but can't upgrade bzr, you can put this
monkeypatch in loggerhead/apps/transport.py, courtesy of Andrew Bennetts:
# Monkey-patch to work around bug 348308
from bzrlib.smart import request
def _setup_jail(self):
if not self._backing_transport.base.startswith('chroot-'):
raise AssertionError('bad monkey! no banana!')
request.jail_info.transports = [self._backing_transport.clone('/')]
request.SmartServerRequest.setup_jail = _setup_jail
Anyway, none of this matters if you don't use shared repos, but pretty
much everybody does, so...
(See bug #348308 [1] for details on the bug in bzr. I don't think anyone
filed a bug for the Loggerhead issue.)
[1] <https://bugs.edge.launchpad.net/bzr/+bug/348308>
--
More information about the bazaar
mailing list