[MERGE] add a command for managing the Launchpad user ID.

James Henstridge james at jamesh.id.au
Fri Oct 12 03:25:14 BST 2007


On 12/10/2007, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> James Henstridge wrote:
> > For some of the Launchpad/Bazaar improvements we are looking at doing,
> > it would be useful for Bazaar to know the user's Launchpad user ID.
> > The attached bundle adds a "bzr launchpad-login" command that is
> > similar in spirit to "bzr whoami".
>
> I've never been a fan of having a launchpad plugin in Bazaar, so:
> bb:abstain
>
> > +def get_lp_login(config=None):
> > +    """Return the user's Launchpad Username"""
> > +    if config is None:
> > +        config = GlobalConfig()
> > +
> > +    return config.get_user_option('launchpad_username')
>
> ^^^ I think "explicit is better than implicit" applies here.  It would
> be easy for someone to assume that they never need to supply a config to
> get_lp_login, and presumably that would be bad.
>
> On the flip side, are there security implications to permitting remote
> branches to set the user's launchpad ID?  If so, then an interface that
> allows TreeConfig or BranchConfig to be supplied could be dangerous.

The argument was only intended for use in testing.  There are many
cases where we have no branch to use as context (for instance, when
trying to resolve lp: URLs).  I've updated the branch to underscore
prefix the relevant variables, and will resubmit.

James.



More information about the bazaar mailing list