pybugz
pybugz copied to clipboard
Allow the name of the 'bugz' binary to choose the connection used
The goail is to allow a user to create multiple symlinks to the 'bugz' binary e.g. 'gnomebz', 'kdebz' each corresponding to a connection.
E.g. Bugzrc:
[gnome] bugz-alias: gnomebz ... [redhat] bugz-alias: rhbz
Command line usage:
$ gnomebz ... # works like "bugz --connection gnome ..." $ rhbz ... # works like "bugz --connection redhat ..."
Inspired by busybox style "multicall binaries".
I do not see the use case for this feature off the top of my head since it is possible to use shell aliases to accomplish the same thing.
If, however, you feel that this feature is important, please comment. I am willing to be convinced. :-)
Let me try to convince you then :)
I feel this is a case of "a built-in structured way to accomplish a common setup is better than leaving it up to each user to configure". Having multiple bugz
binaries is an improvement over shell aliases because:
- It makes it easier to ship a standard set of built-in binary names corresponding to the large bugzilla instances used in Open Source projects.
- You won't get used to a shell aliases but then get surprised by for e.g. subprocess.call(['gnomebz', ...]) not working by default because "gnomebz" is a shell alias and isn't recognized by exec()
In practice, if you leave it up to the user to set shell aliases I think > 80% of the time it's just left undone.
I am willing to reopen this for consideration.
There have been major changes in the code since you submitted the pull request, so please rebase it on current master.
I am definitely sitting on the fence about this for a couple of reasons.
- I don't follow your comment above about a standard set of built in binary names. There is only one binary, bugz, and that is the only binary I currently plan to ship.
- How is this supposed to interact with the the connection setting in the default section of the configuration system and the --connection command line switch?
Re: interaction with connection setting in the default section of the config file and the --connection option
Running gnomebz
should act as if bugz --connection gnome
were invoked thus it should override the connection setting in the default section of the config file. As to whether to allow the --connection
option to again override the connection used, both behavior seems fine.