Uninformative error message on branching from branch subdirectory

Bug #407307 reported by Johan Walles
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Bazaar Subversion Plugin
Triaged
Low
Unassigned

Bug Description

bzr 1.16.1, bzr-svn 0.6.3.

"
$ bzr branch http://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2/src
bzr: ERROR: Not a branch: "/maven/scm/tags/maven-scm-1.2/src".
"

What I should have done is (note lack of /src at the end):
"
bzr branch http://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2
"

The error message should tell me that. A better error message would have been:
"
bzr: ERROR: Must branch from top of branch, try this path instead: "/maven/scm/tags/maven-scm-1.2"
"

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

this is a bzr problem, NotBranchError is special because it's used during the probing (which probably needs an overhaul).

If bzr-svn would throw a more specific error here, you might see it in situations where bzr-svn isn't relevant.

affects: bzr-svn → bzr
Jelmer Vernooij (jelmer)
Changed in bzr:
status: New → Triaged
Changed in bzr-svn:
status: New → Triaged
Changed in bzr:
importance: Undecided → Low
Changed in bzr-svn:
importance: Undecided → Low
Johan Walles (walles)
tags: added: ui
Johan Walles (walles)
tags: added: usability
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Revision history for this message
Samuel Bronson (naesten) wrote :

I don't suppose it would help to subclass NotBranchError, or that there is a way to pass it a better error message?

(I'm a bit surprised that bzr-svn doesn't just do the wrong thing, considering the sloppy way SVN handles branches!)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 407307] Re: Uninformative error message on branching from branch subdirectory

On Tue, 2011-03-29 at 17:31 +0000, Samuel Bronson wrote:
> I don't suppose it would help to subclass NotBranchError, or that there
> is a way to pass it a better error message?
Yeah, that's ideally how this should be fixed - and it's what we do in
some other situations already. However, bzr currently catches NotBranchError and
displays a custom error message, ignoring the message in the exception.

> (I'm a bit surprised that bzr-svn doesn't just do the wrong thing,
> considering the sloppy way SVN handles branches!)
We could do that, but we don't want to encourage people to do the wrong
thing (and then e.g. complain about bzr-svn performance).

Cheers,

Jelmer

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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