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

David Clymer david at hrcsb.org
Sat Sep 10 05:28:40 BST 2005


On Sat, 2005-09-10 at 00:12 +1000, Robert Collins wrote:
> On Thu, 2005-09-08 at 12:36 -0400, David Clymer wrote:
> > I found the following error somewhat cryptic. This patch contains a
> > slightly friendlier one.
> 
> I'm not going to merge this at this point, though it would be good to
> get in. There was a PEP-8 (the coding standard we use) issue - below is
> an updated copy of the patch showing the correction (line wrap at or
> before 80 characters). More imporantly though, there are two actual
> problems with the patch.
> The first is that this takes a specialised error that is useful for any
> front end OR program-control of bzr and turns it into a general error
> that is only useful for front ends. The way to fix that is to put the
> try/except block in 'bzrlib/builtins.py', in the cmd_add class.

whoops. yeah, I see what you mean. I think this patch should address
both of those things.

> 
> Secondly, this is something we would not want to regress - so if you
> could do a blackbox test to ensure that the ui shows the sane error,
> that would help immensely.

I had to modify TestCaseInTempDir.runcmd() in order to access the error
output of the executed command, so that I could right my blackbox test.
The runcmd docstring stated that it was supposed to be returning a tuple
of output from stdout & stderr, so I just modified to match its claims.

-davidc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: errmsg_and_blackbox_test.patch
Type: text/x-patch
Size: 2634 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050910/27401345/attachment.bin 


More information about the bazaar mailing list