[RFC][PATCH] support for aliases in bazaar.conf

Erik Bågfors zindar at gmail.com
Mon Feb 13 00:31:03 GMT 2006


> >> You need a double space before TestAliases in test_aliases.py
> >
> > Double space? I'm trying to look through the other test_*py files to
> > understand what you mean, but I'm lost.
>
> PEP8 says that there should be 2 blank lines between top level items. So
> you end up with:
>
> import os
>
> import bzrlib # One line between stdlib includes, and local includes
>
>
> class Foo: # 2 lines between import and class

I looked at test_cat.py when I wrote this, and it doesn't have 2
lines.  Fixed anyway.

> >> Instead of doing a double loop over alias_argv and then argv, why not do
> >> a single loop with
> >>
> >> for arg in alias_argv + argv:
> >>
> >> It also makes your patch smaller, since it doesn't looked like you
> >> changed all the lines that you just indented.
> >
> > Well, that was my first thought as well, but I need to know if I'm in
> > "alias_argv" or in "argv" to get overrides to work.
> >
> > After I have gone trough alias_argv I set
> > proc_aliasarg = False # Done with alias argv
>
> You need this because you only allow overriding between them? If so, I
> guess that is good enough.

Yes,
"cat=cat -r1 -r2" is not ok
"bzr cat -r1 -r2" is not ok
"cat=cat -r1" followed by "bzr cat -r2" is ok.

And there are tests to prove it :)

> By the way, does this allow you to do:
>
> selftest=selftest --no-plugins
>
> That would be really nice, but I wouldn't expect it. Since probably you
> parse aliases long after parsing globals.

Correct.

> So with the whitespace cleanups, +1 from me.
> John

Thanks

Whitespace cleanups pushed.

/Erik




More information about the bazaar mailing list