1
# Copyright (C) 2006 Canonical Ltd
1
# Copyright (C) 2006, 2007 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
"""Launchpad.net branch registration plugin for bzr
19
This adds commands that tell launchpad about newly-created branches, etc.
17
"""Launchpad.net integration plugin for Bazaar
21
19
To install this file, put the 'bzr_lp' directory, or a symlink to it,
22
20
in your ~/.bazaar/plugins/ directory.
28
26
# see http://bazaar-vcs.org/Specs/BranchRegistrationTool
30
28
from bzrlib.commands import Command, Option, register_command
29
from bzrlib.transport import register_lazy_transport
30
from bzrlib.help_topics import topic_registry
34
33
class cmd_register_branch(Command):
116
115
register_command(cmd_register_branch)
117
register_lazy_transport(
119
'bzrlib.plugins.launchpad.lp_indirect',
120
'launchpad_transport_indirect')
122
register_lazy_transport(
124
'bzrlib.plugins.launchpad.lp_indirect',
125
'launchpad_transport_indirect')
118
127
def test_suite():
119
128
"""Called by bzrlib to fetch tests for this plugin"""
120
129
from unittest import TestSuite, TestLoader
121
130
import test_register
122
return TestLoader().loadTestsFromModule(test_register)
131
import test_lp_indirect
133
loader = TestLoader()
135
for m in [test_register, test_lp_indirect]:
136
suite.addTests(loader.loadTestsFromModule(m))
139
_launchpad_help = """Integration with Launchpad.net
141
Launchpad.net provides free Bazaar branch hosting with integrated bug and
142
specification tracking.
144
The bzr client (through the plugin called 'launchpad') has two special
145
features to communicate with Launchpad:
147
* The register-branch command tells launchpad about the url of a
148
public branch. Launchpad will then mirror the branch, display
149
its contents and allow it to be attached to bugs and other
152
* The 'lp:' transport uses Launchpad as a directory service:
153
for example 'lp:bzr' and 'lp:python' refer to the main branches of the
154
relevant projects and may be branched, logged, etc. (Only read access
155
is supported at present.)
157
For more information see http://help.launchpad.net/
159
topic_registry.register('launchpad',
161
'Using Bazaar with Launchpad.net')