pybugz icon indicating copy to clipboard operation
pybugz copied to clipboard

Allow the name of the 'bugz' binary to choose the connection used

Open scottt opened this issue 12 years ago • 4 comments

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".

scottt avatar Jan 20 '13 16:01 scottt

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. :-)

williamh avatar Nov 17 '14 16:11 williamh

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:

  1. 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.
  2. 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.

scottt avatar Nov 17 '14 16:11 scottt

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.

  1. 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.
  2. 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?

williamh avatar Nov 18 '14 14:11 williamh

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.

scottt avatar Nov 18 '14 15:11 scottt