precedence order for aliases

Bug #235432 reported by Saša Janiška
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

Hi!

I'm noticing some strange behaviour how Bazaar handles user-defined aliases and I'm not sure whether it is a bug or feature...

I defined one alias in ~/.bazaar/bazaar.conf as:

[ALIASES]
checkout=checkout --lightweight

Invoking 'bzr help checkout' gives:

[...]
Aliases: co
See also: branch, checkouts
'bzr checkout' is an alias for 'bzr checkout --lightweight'.

and, therefore I'd expect that 'bzr co' would expand to 'bzr checkout' first and then to 'bzr checkout --lightweight', but it does not so.

Maybe it's a feature, but, imho, it's not orthogonal and I'd expect that user-defined alias is expanded as the last. Finally, the above help file output implies so ;)

Sincerely,
Gour

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 235432] [NEW] precedence order for aliases

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gour wrote:
> Public bug reported:
>
> Hi!
>
> I'm noticing some strange behaviour how Bazaar handles user-defined
> aliases and I'm not sure whether it is a bug or feature...

It's a feature. It keeps the model simple. It allows the aliases to
vary independently. It allows the original command be given an alias,
while an alias is created for the original name.

> [...]
> Aliases: co
> See also: branch, checkouts
> 'bzr checkout' is an alias for 'bzr checkout --lightweight'.

> Maybe it's a feature, but, imho, it's not orthogonal and I'd expect that
> user-defined alias is expanded as the last. Finally, the above help file
> output implies so ;)

I don't think so. User aliases and built-in aliases are completely
different.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPdy+0F+nu1YWqI0RAh1kAJ9ag0Ail2ww3u7SHUwW8pGxoQQExwCffz83
iFO0EktI0SQhTZktoNW7SZ0=
=m9wj
-----END PGP SIGNATURE-----

Revision history for this message
Saša Janiška (gour) wrote :

>>>>> "Aaron" == Aaron Bentley <email address hidden> writes:

Hi Aaron,

Aaron> It's a feature. It keeps the model simple. It allows the
Aaron> aliases to vary independently. It allows the original command be
Aaron> given an alias, while an alias is created for the original name.

OK. I'm trying to adjust to the model...

Aaron> I don't think so. User aliases and built-in aliases are
Aaron> completely different.

Heh, for the experiment's sake I tried to define:

co=checkout --lightweight

alias and was curios what would happen.

Fortunately, bzr did the Right Thing :-)

So, now I see & understand that user aliases override built-in ones and
can live with that ;)

Shall we close this 'bug' as invalid?

Sincerely,
Gour

--

Gour | Zagreb, Croatia | GPG key: C6E7162D
----------------------------------------------------------------

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Invalid
Revision history for this message
John A Meinel (jameinel) wrote :

This is by design.

Revision history for this message
Saša Janiška (gour) wrote : Re: [Bug 235432] Re: precedence order for aliases

>>>>> "John" == John A Meinel <email address hidden> writes:

Hi John,

John> This is by design.

Thank you for reply.

Yes, I see it now and can live with it ;)

Sincerely,
Gour

--

Gour | Zagreb, Croatia | GPG key: C6E7162D
----------------------------------------------------------------

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.