bzr serve and access control?

Josef Wolf jw at raven.inka.de
Thu Feb 4 06:46:32 GMT 2010


On Wed, Feb 03, 2010 at 07:07:02PM +1100, Ben Finney wrote:
> Josef Wolf <jw at raven.inka.de> writes:
> 
> > So, given a branch like //host/srv/repo/a_project/branch, how exactly
> > does bzr find out that it is located in the repository at
> > //host/srv/repo?
> 
> By walking up the path components, looking for a repository directory:
> 
> * Is there a repository “here”, //host/srv/repo/a_project/branch/ ?
> * Is there a repository in the parent, //host/srv/repo/a_project/ ?
> * Is there a repository in the parent's parent, //host/srv/repo/ ?
> 
> et cetera, until it finds a repository (a hit, which terminates the
> search) or reaches the root of the path (a miss, indicating the path is
> not inside a repository).

How about that:

Currently, --directory=/ is hard coded into the client, and it fails if
the server refuses access.

What if, instead of failing, it would retry with --directory=/srv and so on.
Finally, with --directory=/srv/repo (in the above example) it would succeed
and could continue as if nothing happened.

That would be fully compatible to the current behavior, since the very first
try would succeed on servers without restrictions. But it would also allow
the server to refuse access to specific areas.

Opinions?



More information about the bazaar mailing list