[PATCH] more informative error for bzr add (when parent is unversioned)

John A Meinel john at arbash-meinel.com
Sun Sep 18 13:56:22 BST 2005


Robert Collins wrote:
> On Sat, 2005-09-17 at 14:08 +1000, Michael Ellerman wrote:
>
>>On Fri, 16 Sep 2005 22:32, Robert Collins wrote:
>>
>>>I do wonder what happens if you cd to / and bzr add usr/bin though.
>>
>>concordia ~$ cd /
>>concordia /$ bzr add usr/bin
>>bzr: ERROR: /usr/bin is not in a branch
>>  at /home/michael/src/bzr/mine/bzrlib/branch.py line 131, in
>>find_branch_root()
>>  see ~/.bzr.log for debug information
>>
>>But that's not quite you meant is it? :D
>
>
> Actually, its *exactly* what I meant :). Its an add of a file or dir in
> an unversioned parent :). And it gets a sucky error message.
>
> Rob
>

I think the error message itself is okay:

bzr: ERROR: /usr/bin is not in a branch

But it shouldn't include the traceback. The problem is that
find_branch_root throws a NotBranchError, which gets treated as a
regular BzrError, not a BzrCommandError. I think it was discussed to
trap it at some level and complain properly.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050918/654e34a0/attachment.pgp 


More information about the bazaar mailing list