[MERGE] Two little fixes/cleanups

Wouter van Heyst larstiq at larstiq.dyndns.org
Sat Dec 10 23:31:18 GMT 2005


On Sat, Dec 10, 2005 at 04:13:16PM -0600, Michael Ellerman wrote:
> On Sat, 10 Dec 2005 08:47, Wouter van Heyst wrote:
> > On Fri, Dec 09, 2005 at 12:20:36AM -0600, Michael Ellerman wrote:
> > >  1476 Michael Ellerman  2005-12-08
> > >       Raise NoSuchFile when someone tries to add a non-existant file.
> >
> > in bzrlib/add.py I would compare with errno.ENOENT instead of 2, +1
> > otherwise.
> 
> Yeah I fixed that up yesterday.

Ah :)

> > >  1475 Michael Ellerman  2005-12-08
> > >       Simplify handling of DivergedBranches in cmd_pull()
> >
> > I slightly prefer the old formatting with double instead of a single space:
> >
> >     "These branches have diverged.  Try merge."
> 
> Hmm, ok :) I guess it seperates it a bit more visually.

*nods*

> > >  1474 Michael Ellerman  2005-12-08
> > >       Catch bad options nicely.
> >
> > I don't think this is an improvement as is. Adding 'changeset' to
> > cmd_cat's takes_options:
> >
> >     bzr.mpe.fixes> ./bzr cat
> >     bzr: ERROR: Internal check failed: Unknown option "changeset"
> >
> > and
> >
> >     bzr.dev> ./bzr cat
> >     bzr: ERROR: exceptions.KeyError: 'changeset'
> >       at /home/larstiq/src/bzr.dev/bzrlib/commands.py line 207
> >       in options
> 
> You don't? I hit this when one of my old plugins skewed with bzr such that the 
> option it wanted wasn't there anymore - it took me a couple of minutes to 
> work that out though. Having the message at least tell me it was looking for 
> an option would have helped I think.

Oh yes, I agree with noting it is an option, I should have been more
explicit. The semi-traceback does more for me knowing where to look then
the 'Internal check failed'. Of course, by the time I had figured out
what your patch was supposed to do, I had been mucking around on line
207 already.

If there could be information on where the offending option comes from,
that would be great.

> I've ripped out that last patch and update the other two, so it's now:
> 
>  1475 Michael Ellerman  2005-12-10
>       Raise NoSuchFile when someone tries to add a non-existant file.
> 
>  1474 Michael Ellerman  2005-12-10
>       Simplify handling of DivergedBranches in cmd_pull()

+1 on these from me.

Wouter van Heyst




More information about the bazaar mailing list