Comment 5 for bug 403857

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 403857] Re: bzr subdirectory export fails on launchpad

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Westby wrote:
> Hi,
>
> I believe the original bug report was slightly wrong, re-opening as I think it is
> still an issue.
>
> It should have been
>
> bzr export localname bzr+ssh://bazaar.launchpad.net/~oubiwann/project/branch/subdir
> bzr: ERROR: Permission denied: "Cannot create 'subdir'. Only Bazaar branches are allowed."

Export to launchpad is not supported. If you want to file a bug about
ls, that's cool.

> Consider
>
> bzr ls lp:~bzr/bzr/trunk/bzrlib/
> bzr: ERROR: Permission denied: "Cannot create 'bzrlib'. Only Bazaar branches are allowed."
> so calling BzrDir.open on a path that is "under" a branch is rejected by LP.
> Presumably if it just says "not found" to the open request then bzr would continue
> and open the containing branch.

But also consider:

$ bzr init foo
Created a standalone tree (format: pack-0.92)

$ mkdir foo/bar
$ touch foo/bar/baz
$ bzr add foo
adding bar
adding bar/baz
$ bzr commit -m 'added bar' foo
Committing to: /home/abentley/foo/

added bar
added bar/baz
abentley@lumpy:~$ bzr push -d foo sftp://localhost/home/abentley/qux
Created new branch.

abentley@lumpy:~$ bzr ls qux/bar
qux/bar/baz
abentley@lumpy:~$ mkdir qux/bar
abentley@lumpy:~$ chmod a-rwx qux/bar
abentley@lumpy:~$ bzr ls qux/bar
bzr: ERROR: Permission denied:
"/home/abentley/qux/bar/.bzr/branch-format": [Errno 13] Permission
denied: u'/home/abentley/qux/bar/.bzr/branch-format'

So I think that bzr should not be stopping if it encounters Permission
denied. Ultimately, it would make sense to emit NoSuchFile for
operations that refer to a non-existant path, and only emit Permission
denied for attempts to create forbidden paths.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkppxPkACgkQ0F+nu1YWqI3bmACfYily+qlNu7MBpWeA0DTe/+Za
DYEAoIiwMDuu1jV9cgshEurvuVVg+dEn
=eYCS
-----END PGP SIGNATURE-----