bzr get tries to read as svn (http:// with authentication)
Jelmer Vernooij
jelmer at vernstok.nl
Sat Dec 1 16:53:23 GMT 2007
On Sat, Dec 01, 2007 at 08:46:10AM -0600, John Arbash Meinel wrote:
> Balazs Ree wrote:
> > bzr version 0.92-1, bzr-svn 0.4.4-1, both installed from Debian distro.
> > If I do "bzr get" on a http access with authentication, I get:
> > $ bzr get http://buildout:passwd@greenfinity.hu/...
> > bzr: ERROR: Permission denied: ".": PROPFIND request failed on '...'
> > This shows it tries to access it as svn, but it's really bzr. If I remove
> > bzr-svn, it works fine.
> This is because bzr-svn gets first chance at probing the remote to see what
> format it is in.
Usually bzr will only try bzr-svn once it's tried its native formats,
for each directory. So far example, when you try to
use Branch.open_containing(http://foo/bar/bla) while
http://foo/bar is a branch, it will do something like this:
http://foo/bar/bla natively -> NotBranchError
http://foo/bar/bla svn -> NotBranchError
http://foo/bar natively -> returns a branch
However, the probing code will return the exception from the last
format it's tried if everything fails, so if none of
http://foo/bar/bla would contain a branch:
http://foo/bar/bla natively -> NotBranchError
http://foo/bar/bla svn -> NotBranchError
http://foo/bar natively -> NotBranchError
http://foo/bar svn -> NotBranchError
In this case, the exception from the Svn branch will be displayed to
the user.
> It sounds like bzr-svn needs to fail gracefully when EPERM happens. And just
> say "NotBranch". Then the rest of the probing code can take over from there.
I think the probing code needs to handle PermissionDenied. If bzr-svn
should raise a NotBranchError then bzr wouldn't be able to ever display
a PermissionDenied error for a Svn branch.
Or perhaps the probing code needs to be extended a bit to allow for more
verbose errors wrapped inside NotBranchError. Something like this:
...
for format in formats:
try:
return format.open(my_url)
except NotBranchError, e:
raise e.realerror
Cheers,
Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071201/6b42cebe/attachment.pgp
More information about the bazaar
mailing list