"bzr cat lp:foo/bar" fails

Bug #269746 reported by Nazo
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

using bzr 1.6 on Ubuntu intrepid

$ bzr ls lp:ubufox
...
lp:ubufox/content/overlay.js
...
$ bzr cat lp:ubufox/content/overlay.js
bzr: ERROR: Invalid url supplied to transport: "lp:ubufox/content/overlay.js": Invalid branch identifier: 'ubufox/content/overlay.js'

I think this may be design bug.

Revision history for this message
James Westby (james-w) wrote :

Hi,

I can confirm this problem. I agree that it is a bit of design
problem in the launchpad directory service, but I don't think
fixing it should be too hard.

Thanks,

James

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Jonathan Lange (jml)
tags: added: lpurl
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 269746] Re: "bzr cat lp:foo/bar" fails

One way to handle it would be to have less dwim and instead say 'bzr
cat -d lp:ubufox content/overlay.js'. There is another bug asking for
-d support across all commands.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

It seems like Launchpad shouldn't raise PermissionDenied when a user tries to access a path inside of a branch but rather NoSuchFile.

The following patch to bzr fixes the issue (but could mask other bugs, so is incorrect):

=== modified file 'bzrlib/controldir.py'
--- bzrlib/controldir.py 2011-12-14 12:25:34 +0000
+++ bzrlib/controldir.py 2011-12-16 17:01:05 +0000
@@ -738,6 +738,8 @@
                 return result, urlutils.unescape(a_transport.relpath(url))
             except errors.NotBranchError, e:
                 pass
+ except errors.PermissionDenied:
+ pass
             try:
                 new_t = a_transport.clone('..')
             except errors.InvalidURLJoin:

affects: bzr → launchpad
tags: added: codehosting-ssh
Changed in launchpad:
status: Confirmed → Triaged
tags: added: lp-code
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.