Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

scottt commented Jan 20, 2013

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 scottt 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".
beec8c7
Owner

williamh commented Nov 17, 2014

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 williamh closed this Nov 17, 2014

scottt commented Nov 17, 2014

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.

@williamh williamh reopened this Nov 18, 2014

Owner

williamh commented Nov 18, 2014

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?

scottt commented Nov 18, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment