Custom launchpad plugin

Asked by Eric Berry

I love the launchpad plugin for Bazaar, it's the bit.ly of the VCS world.

Assuming I was able to get Launchpad installed on an internal server, would I be able to create a version of the launchpad plugin to use against that server with a custom alias?

Eg. Can I create a version of the launchpad plugin that works like:
bzr mycompany-login [NAME]
bzr branch mc:project
cd project
bzr push mc:~[NAME]/project/feature1

Or, for another colleague:
bzr mycompany-login [MYNAME]
bzr branch mc:~[THEIRNAME]/project/feature

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Neil Martinsen-Burrell (nmb) said :
#1

You can do this in a plugin. See lp:bzr-colo for an example of a plugin that defines a new directory service (that's what the lp: prefix is called). In fact, the lp: specifier is itself from a plugin and so it should show the steps for registering a new directory service.

Revision history for this message
Eric Berry (elberry) said :
#2

Hi Neil, Thank you for the quick response.

This sounds like exactly what I want to do. Could you please help me out a bit further and point me to the files where the example is? I'm not a python programmer, so any help here would be greatly appreciated.

Thanks,
Eric

Revision history for this message
Vincent Ladeuil (vila) said :
#3

'bzr plugins -v' will tell you where on your system the launchpad plugin is.
To get the sources otherwise:
'bzr branch lp:bzr' for bzr itself
bzr branch lp:bzr-colo' for the colo plugin.

You may also want to look at the bookmarks plugin (bzr branch lp:bzr-bookmarks) which solve
a different problem but may be enough for your needs (and doesn't require coding :).

Revision history for this message
Richard Klein (kleinric) said :
#4

Hi All,
I've been looking to do the same thing. I found a plugin called custom-url-schemes.
http://doc.bazaar.canonical.com/plugins/en/custom-url-schemes-plugin.html

I have a server on the local network (at work) and on the Internet elsewhere... My projects are all stored in ~/branches/. I use bzr+ssh to access everything.
First add the custom url: "bzr custom-url-add serv bzr+ssh://<email address hidden>/~/branch/"
So rather than "bzr branch bzr+ssh://<email address hidden>/~/branch/project1"
I can type "bzr branch serv:project1"
It appears to work well :)

It seems to me that bookmarks allows you to bookmark a specific folder/project, this plugin allows you to map the server. I would think you can make the multiple users work fine using ssh certificates and file permissions.

Revision history for this message
Richard Klein (kleinric) said :
#5

Apologies, the syntax is: "bzr custom-url-scheme-add serv bzr+ssh://<email address hidden>/~/branch/"

I'd left out the "scheme" part of the command.

Can you help with this problem?

Provide an answer of your own, or ask Eric Berry for more information if necessary.

To post a message you must log in.