/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
4763.2.4 by John Arbash Meinel
merge bzr.2.1 in preparation for NEWS entry.
1
# Copyright (C) 2006-2010 Canonical Ltd
0.4.1 by Martin Pool
Start lp-register command
2
#
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
4183.7.1 by Sabin Iacob
update FSF mailing address
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
0.4.1 by Martin Pool
Start lp-register command
16
2898.3.8 by James Henstridge
Get rid of relative imports in Launchpad plugin.
17
"""Launchpad.net integration plugin for Bazaar."""
0.4.1 by Martin Pool
Start lp-register command
18
0.4.17 by Martin Pool
Allow xmlrpc service url to be overridden by $BZR_LP_XMLRPC_URL
19
# The XMLRPC server address can be overridden by setting the environment
4634.165.2 by Vincent Ladeuil
Fix typo in comment so a grep would match (I started with the wron comment to seed my first grep :-/)
20
# variable $BZR_LP_XMLRPC_URL
0.4.17 by Martin Pool
Allow xmlrpc service url to be overridden by $BZR_LP_XMLRPC_URL
21
0.4.9 by Martin Pool
Don't transmit non-standard xmlrpc <nil> value.
22
# see http://bazaar-vcs.org/Specs/BranchRegistrationTool
23
4031.2.11 by John Arbash Meinel
Turn a bunch of imports into lazy imports.
24
from bzrlib.lazy_import import lazy_import
25
lazy_import(globals(), """
26
from bzrlib import (
27
    trace,
28
    )
29
""")
30
0.4.1 by Martin Pool
Start lp-register command
31
from bzrlib.commands import Command, Option, register_command
4797.89.1 by John Arbash Meinel
Cherrypick the launchpad plugin changes for bug #609187.
32
from bzrlib import (
33
    branch as _mod_branch,
34
    lazy_regex,
35
    # Since we are a built-in plugin we share the bzrlib version
36
    version_info,
37
    )
3251.4.1 by Aaron Bentley
Convert LP transport into directory service
38
from bzrlib.directory_service import directories
4031.2.5 by Jonathan Lange
Refactor the code so we don't do too many remote requests.
39
from bzrlib.errors import (
40
    BzrCommandError,
4505.6.25 by Jonathan Lange
Add a test to check what happens if launchpadlib not available.
41
    DependencyNotPresent,
4031.2.5 by Jonathan Lange
Refactor the code so we don't do too many remote requests.
42
    InvalidURL,
43
    NoPublicBranch,
44
    NotBranchError,
45
    )
2245.8.6 by Martin Pool
Documentation under 'help launchpad'
46
from bzrlib.help_topics import topic_registry
0.4.4 by Martin Pool
Start forming xmlrpc requests
47
48
0.4.2 by Martin Pool
Rename command to 'register-branch'
49
class cmd_register_branch(Command):
50
    """Register a branch with launchpad.net.
0.4.1 by Martin Pool
Start lp-register command
51
52
    This command lists a bzr branch in the directory of branches on
2400.2.4 by Robert Collins
(robertc) Typo in the help for ``register-branch`` fixed. (Robert Collins, #96770)
53
    launchpad.net.  Registration allows the branch to be associated with
0.4.1 by Martin Pool
Start lp-register command
54
    bugs or specifications.
3943.8.1 by Marius Kruger
remove all trailing whitespace from bzr source
55
4416.7.1 by Neil Martinsen-Burrell
Fix 238764 refer to projects rather than products in launchpad plugin
56
    Before using this command you must register the project to which the
0.4.1 by Martin Pool
Start lp-register command
57
    branch belongs, and create an account for yourself on launchpad.net.
0.4.3 by Martin Pool
More command line processing
58
59
    arguments:
3200.2.3 by Robert Collins
Tweak wording.
60
        public_url: The publicly visible url for the branch to register.
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
61
                    This must be an http or https url (which Launchpad can read
62
                    from to access the branch). Local file urls, SFTP urls, and
63
                    bzr+ssh urls will not work.
64
                    If no public_url is provided, bzr will use the configured
3200.2.3 by Robert Collins
Tweak wording.
65
                    public_url if there is one for the current branch, and
66
                    otherwise error.
0.4.3 by Martin Pool
More command line processing
67
68
    example:
4416.7.1 by Neil Martinsen-Burrell
Fix 238764 refer to projects rather than products in launchpad plugin
69
        bzr register-branch http://foo.com/bzr/fooproject.mine \\
70
                --project fooproject
0.4.1 by Martin Pool
Start lp-register command
71
    """
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
72
    takes_args = ['public_url?']
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
73
    takes_options = [
4416.7.1 by Neil Martinsen-Burrell
Fix 238764 refer to projects rather than products in launchpad plugin
74
         Option('project',
75
                'Launchpad project short name to associate with the branch.',
0.4.15 by Martin Pool
(register-branch) Add command-line options
76
                unicode),
4416.7.3 by Neil Martinsen-Burrell
Retain --product options for register-branch, but deprecate it in favor of --project
77
         Option('product',
78
                'Launchpad product short name to associate with the branch.', 
79
                unicode,
80
                hidden=True),
0.4.15 by Martin Pool
(register-branch) Add command-line options
81
         Option('branch-name',
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
82
                'Short name for the branch; '
83
                'by default taken from the last component of the url.',
0.4.15 by Martin Pool
(register-branch) Add command-line options
84
                unicode),
85
         Option('branch-title',
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
86
                'One-sentence description of the branch.',
0.4.15 by Martin Pool
(register-branch) Add command-line options
87
                unicode),
88
         Option('branch-description',
2598.1.5 by Martin Pool
Fix one more option message.
89
                'Longer description of the purpose or contents of the branch.',
0.4.15 by Martin Pool
(register-branch) Add command-line options
90
                unicode),
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
91
         Option('author',
92
                "Branch author's email address, if not yourself.",
0.4.16 by Martin Pool
(register-branch) Add --author option and respect --dry-run
93
                unicode),
0.4.19 by test at canonical
add possibility to link to a bug when registering a branch. factor out some common functionality from BranchRegistrationRequest.
94
         Option('link-bug',
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
95
                'The bug this branch fixes.',
0.4.19 by test at canonical
add possibility to link to a bug when registering a branch. factor out some common functionality from BranchRegistrationRequest.
96
                int),
0.4.15 by Martin Pool
(register-branch) Add command-line options
97
         Option('dry-run',
2598.1.1 by Martin Pool
Add test for and documentation of option style, fix up existing options to comply
98
                'Prepare the request but don\'t actually send it.')
0.4.15 by Martin Pool
(register-branch) Add command-line options
99
        ]
100
101
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
102
    def run(self,
103
            public_url=None,
4416.7.1 by Neil Martinsen-Burrell
Fix 238764 refer to projects rather than products in launchpad plugin
104
            project='',
4416.7.3 by Neil Martinsen-Burrell
Retain --product options for register-branch, but deprecate it in favor of --project
105
            product=None,
0.4.15 by Martin Pool
(register-branch) Add command-line options
106
            branch_name='',
107
            branch_title='',
108
            branch_description='',
0.4.16 by Martin Pool
(register-branch) Add --author option and respect --dry-run
109
            author='',
0.4.19 by test at canonical
add possibility to link to a bug when registering a branch. factor out some common functionality from BranchRegistrationRequest.
110
            link_bug=None,
0.4.15 by Martin Pool
(register-branch) Add command-line options
111
            dry_run=False):
2898.3.8 by James Henstridge
Get rid of relative imports in Launchpad plugin.
112
        from bzrlib.plugins.launchpad.lp_registration import (
4505.6.4 by Jonathan Lange
Remove unnecessary import.
113
            BranchRegistrationRequest, BranchBugLinkRequest,
4505.6.10 by Jonathan Lange
Move lp_registration imports into commands.
114
            DryRunLaunchpadService, LaunchpadService)
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
115
        if public_url is None:
116
            try:
4031.2.11 by John Arbash Meinel
Turn a bunch of imports into lazy imports.
117
                b = _mod_branch.Branch.open_containing('.')[0]
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
118
            except NotBranchError:
119
                raise BzrCommandError('register-branch requires a public '
120
                    'branch url - see bzr help register-branch.')
121
            public_url = b.get_public_branch()
122
            if public_url is None:
123
                raise NoPublicBranch(b)
4416.7.3 by Neil Martinsen-Burrell
Retain --product options for register-branch, but deprecate it in favor of --project
124
        if product is not None:
125
            project = product
126
            trace.note('--product is deprecated; please use --project.')
127
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
128
129
        rego = BranchRegistrationRequest(branch_url=public_url,
0.4.15 by Martin Pool
(register-branch) Add command-line options
130
                                         branch_name=branch_name,
131
                                         branch_title=branch_title,
132
                                         branch_description=branch_description,
4416.7.1 by Neil Martinsen-Burrell
Fix 238764 refer to projects rather than products in launchpad plugin
133
                                         product_name=project,
0.4.16 by Martin Pool
(register-branch) Add --author option and respect --dry-run
134
                                         author_email=author,
0.4.15 by Martin Pool
(register-branch) Add command-line options
135
                                         )
3200.2.1 by Robert Collins
* The ``register-branch`` command will now use the public url of the branch
136
        linko = BranchBugLinkRequest(branch_url=public_url,
0.4.19 by test at canonical
add possibility to link to a bug when registering a branch. factor out some common functionality from BranchRegistrationRequest.
137
                                     bug_id=link_bug)
1668.1.12 by Martin Pool
(launchpad plugin) Improved --dry-run that uses a dummy xmlrpc service.
138
        if not dry_run:
139
            service = LaunchpadService()
140
            # This gives back the xmlrpc url that can be used for future
141
            # operations on the branch.  It's not so useful to print to the
142
            # user since they can't do anything with it from a web browser; it
143
            # might be nice for the server to tell us about an html url as
144
            # well.
145
        else:
146
            # Run on service entirely in memory
147
            service = DryRunLaunchpadService()
0.4.19 by test at canonical
add possibility to link to a bug when registering a branch. factor out some common functionality from BranchRegistrationRequest.
148
        service.gather_user_credentials()
4505.6.21 by Jonathan Lange
Clean up flakes.
149
        rego.submit(service)
1668.1.12 by Martin Pool
(launchpad plugin) Improved --dry-run that uses a dummy xmlrpc service.
150
        if link_bug:
4505.6.21 by Jonathan Lange
Clean up flakes.
151
            linko.submit(service)
1668.1.12 by Martin Pool
(launchpad plugin) Improved --dry-run that uses a dummy xmlrpc service.
152
        print 'Branch registered.'
0.4.1 by Martin Pool
Start lp-register command
153
0.4.2 by Martin Pool
Rename command to 'register-branch'
154
register_command(cmd_register_branch)
2245.8.4 by Martin Pool
lp:/// indirection works
155
2898.3.3 by James Henstridge
Add launchpad-login command.
156
3955.3.5 by Jonathan Lange
Add an untested plugin, make the error handling a little nicer.
157
class cmd_launchpad_open(Command):
158
    """Open a Launchpad branch page in your web browser."""
159
160
    aliases = ['lp-open']
3955.3.7 by Jonathan Lange
Test the launchpad-open command. Fix up some minor bugs.
161
    takes_options = [
162
        Option('dry-run',
163
               'Do not actually open the browser. Just say the URL we would '
164
               'use.'),
165
        ]
3955.3.5 by Jonathan Lange
Add an untested plugin, make the error handling a little nicer.
166
    takes_args = ['location?']
167
4031.2.5 by Jonathan Lange
Refactor the code so we don't do too many remote requests.
168
    def _possible_locations(self, location):
169
        """Yield possible external locations for the branch at 'location'."""
170
        yield location
171
        try:
4867.2.1 by Neil Martinsen-Burrell
launchpad-open works from a subdirectory of a branch
172
            branch = _mod_branch.Branch.open_containing(location)[0]
4031.2.5 by Jonathan Lange
Refactor the code so we don't do too many remote requests.
173
        except NotBranchError:
174
            return
175
        branch_url = branch.get_public_branch()
176
        if branch_url is not None:
177
            yield branch_url
178
        branch_url = branch.get_push_location()
179
        if branch_url is not None:
180
            yield branch_url
181
182
    def _get_web_url(self, service, location):
4505.6.10 by Jonathan Lange
Move lp_registration imports into commands.
183
        from bzrlib.plugins.launchpad.lp_registration import (
184
            NotLaunchpadBranch)
4031.2.5 by Jonathan Lange
Refactor the code so we don't do too many remote requests.
185
        for branch_url in self._possible_locations(location):
186
            try:
187
                return service.get_web_url_from_branch_url(branch_url)
188
            except (NotLaunchpadBranch, InvalidURL):
189
                pass
190
        raise NotLaunchpadBranch(branch_url)
191
3955.3.7 by Jonathan Lange
Test the launchpad-open command. Fix up some minor bugs.
192
    def run(self, location=None, dry_run=False):
4505.6.10 by Jonathan Lange
Move lp_registration imports into commands.
193
        from bzrlib.plugins.launchpad.lp_registration import (
194
            LaunchpadService)
3955.3.5 by Jonathan Lange
Add an untested plugin, make the error handling a little nicer.
195
        if location is None:
196
            location = u'.'
4505.6.21 by Jonathan Lange
Clean up flakes.
197
        web_url = self._get_web_url(LaunchpadService(), location)
4031.2.11 by John Arbash Meinel
Turn a bunch of imports into lazy imports.
198
        trace.note('Opening %s in web browser' % web_url)
3955.3.7 by Jonathan Lange
Test the launchpad-open command. Fix up some minor bugs.
199
        if not dry_run:
4511.1.1 by Alexander Belchenko
launchpad plugin: import webbrowse should be explicit and never lazy, otherwise bzr.exe lacks this module.
200
            import webbrowser   # this import should not be lazy
201
                                # otherwise bzr.exe lacks this module
3955.3.7 by Jonathan Lange
Test the launchpad-open command. Fix up some minor bugs.
202
            webbrowser.open(web_url)
3955.3.5 by Jonathan Lange
Add an untested plugin, make the error handling a little nicer.
203
204
register_command(cmd_launchpad_open)
205
206
2898.3.3 by James Henstridge
Add launchpad-login command.
207
class cmd_launchpad_login(Command):
2934.1.1 by Ian Clatworthy
(James Henstridge) add a command for managing the Launchpad user ID
208
    """Show or set the Launchpad user ID.
2898.3.3 by James Henstridge
Add launchpad-login command.
209
210
    When communicating with Launchpad, some commands need to know your
211
    Launchpad user ID.  This command can be used to set or show the
212
    user ID that Bazaar will use for such communication.
213
214
    :Examples:
215
      Show the Launchpad ID of the current user::
216
217
          bzr launchpad-login
218
2898.3.9 by James Henstridge
* Add a simple NEWS item for the command.
219
      Set the Launchpad ID of the current user to 'bob'::
2898.3.3 by James Henstridge
Add launchpad-login command.
220
2898.3.9 by James Henstridge
* Add a simple NEWS item for the command.
221
          bzr launchpad-login bob
2898.3.3 by James Henstridge
Add launchpad-login command.
222
    """
223
    aliases = ['lp-login']
224
    takes_args = ['name?']
225
    takes_options = [
4505.1.2 by Jonathan Lange
Add many more tests, fix the actual bug.
226
        'verbose',
2898.3.4 by James Henstridge
Cleanups from mini-review by Tim.
227
        Option('no-check',
228
               "Don't check that the user name is valid."),
2898.3.3 by James Henstridge
Add launchpad-login command.
229
        ]
230
4505.1.2 by Jonathan Lange
Add many more tests, fix the actual bug.
231
    def run(self, name=None, no_check=False, verbose=False):
4505.6.13 by Jonathan Lange
Clarify the comment.
232
        # This is totally separate from any launchpadlib login system.
2898.3.8 by James Henstridge
Get rid of relative imports in Launchpad plugin.
233
        from bzrlib.plugins.launchpad import account
2898.3.3 by James Henstridge
Add launchpad-login command.
234
        check_account = not no_check
235
236
        if name is None:
237
            username = account.get_lp_login()
238
            if username:
2898.3.4 by James Henstridge
Cleanups from mini-review by Tim.
239
                if check_account:
240
                    account.check_lp_login(username)
4505.1.3 by Jonathan Lange
Add some extra untested verbosity.
241
                    if verbose:
242
                        self.outf.write(
243
                            "Launchpad user ID exists and has SSH keys.\n")
2898.3.3 by James Henstridge
Add launchpad-login command.
244
                self.outf.write(username + '\n')
245
            else:
246
                self.outf.write('No Launchpad user ID configured.\n')
2898.3.9 by James Henstridge
* Add a simple NEWS item for the command.
247
                return 1
2898.3.3 by James Henstridge
Add launchpad-login command.
248
        else:
4216.2.1 by Michael Hudson
well this is it
249
            name = name.lower()
2898.3.3 by James Henstridge
Add launchpad-login command.
250
            if check_account:
251
                account.check_lp_login(name)
4505.1.3 by Jonathan Lange
Add some extra untested verbosity.
252
                if verbose:
253
                    self.outf.write(
254
                        "Launchpad user ID exists and has SSH keys.\n")
2898.3.3 by James Henstridge
Add launchpad-login command.
255
            account.set_lp_login(name)
4505.1.2 by Jonathan Lange
Add many more tests, fix the actual bug.
256
            if verbose:
257
                self.outf.write("Launchpad user ID set to '%s'.\n" % (name,))
2898.3.3 by James Henstridge
Add launchpad-login command.
258
259
register_command(cmd_launchpad_login)
260
261
4505.6.9 by Jonathan Lange
Add some XXX comments based on the review.
262
# XXX: cmd_launchpad_mirror is untested
4505.6.6 by Jonathan Lange
Add a command to mirror Launchpad branches now.
263
class cmd_launchpad_mirror(Command):
264
    """Ask Launchpad to mirror a branch now."""
265
266
    aliases = ['lp-mirror']
267
    takes_args = ['location?']
268
269
    def run(self, location='.'):
4505.6.25 by Jonathan Lange
Add a test to check what happens if launchpadlib not available.
270
        from bzrlib.plugins.launchpad import lp_api
4505.6.10 by Jonathan Lange
Move lp_registration imports into commands.
271
        from bzrlib.plugins.launchpad.lp_registration import LaunchpadService
4505.6.30 by Jonathan Lange
Add basic smoke tests to show that the command exists.
272
        branch = _mod_branch.Branch.open(location)
4505.6.6 by Jonathan Lange
Add a command to mirror Launchpad branches now.
273
        service = LaunchpadService()
274
        launchpad = lp_api.login(service)
275
        lp_branch = lp_api.load_branch(launchpad, branch)
276
        lp_branch.requestMirror()
277
278
4505.6.8 by Jonathan Lange
Always register the lp-mirror command. Only try to load launchpadlib if
279
register_command(cmd_launchpad_mirror)
4505.6.6 by Jonathan Lange
Add a command to mirror Launchpad branches now.
280
281
3251.4.2 by Aaron Bentley
Clean up Launchpad directory service code
282
def _register_directory():
3251.4.3 by Aaron Bentley
More renames and cleanups
283
    directories.register_lazy('lp:', 'bzrlib.plugins.launchpad.lp_directory',
3251.4.2 by Aaron Bentley
Clean up Launchpad directory service code
284
                              'LaunchpadDirectory',
285
                              'Launchpad-based directory service',)
286
_register_directory()
2245.8.5 by Martin Pool
Add short-form lp:PRODUCT url form
287
4797.89.1 by John Arbash Meinel
Cherrypick the launchpad plugin changes for bug #609187.
288
# This is kept in __init__ so that we don't load lp_api_lite unless the branch
289
# actually matches. That way we can avoid importing extra dependencies like
290
# json.
291
_package_branch = lazy_regex.lazy_compile(
292
    r'bazaar.launchpad.net.*?/'
293
    r'(?P<user>~[^/]+/)?(?P<archive>ubuntu|debian)/(?P<series>[^/]+/)?'
294
    r'(?P<project>[^/]+)(?P<branch>/[^/]+)?'
295
    )
296
297
def _get_package_branch_info(url):
298
    """Determine the packaging information for this URL.
299
300
    :return: If this isn't a packaging branch, return None. If it is, return
301
        (archive, series, project)
302
    """
303
    if url is None:
304
        return None
305
    m = _package_branch.search(url)
306
    if m is None:
307
        return None
308
    archive, series, project, user = m.group('archive', 'series',
309
                                             'project', 'user')
310
    if series is not None:
311
        # series is optional, so the regex includes the extra '/', we don't
312
        # want to send that on (it causes Internal Server Errors.)
313
        series = series.strip('/')
314
    if user is not None:
315
        user = user.strip('~/')
316
        if user != 'ubuntu-branches':
317
            return None
318
    return archive, series, project
319
320
321
def _check_is_up_to_date(the_branch):
322
    info = _get_package_branch_info(the_branch.base)
323
    if info is None:
324
        return
325
    c = the_branch.get_config()
326
    verbosity = c.get_user_option('launchpad.packaging_verbosity')
327
    if verbosity is not None:
328
        verbosity = verbosity.lower()
329
    if verbosity == 'off':
330
        trace.mutter('not checking %s because verbosity is turned off'
331
                     % (the_branch.base,))
332
        return
333
    archive, series, project = info
334
    from bzrlib.plugins.launchpad import lp_api_lite
335
    latest_pub = lp_api_lite.LatestPublication(archive, series, project)
336
    lp_api_lite.report_freshness(the_branch, verbosity, latest_pub)
337
338
339
def _register_hooks():
340
    _mod_branch.Branch.hooks.install_named_hook('open',
341
        _check_is_up_to_date, 'package-branch-up-to-date')
342
343
344
_register_hooks()
0.4.1 by Martin Pool
Start lp-register command
345
4776.2.2 by Vincent Ladeuil
Start testing the XMLRPC transport re-implemented on top of _urllib2_wrappers.
346
def load_tests(basic_tests, module, loader):
347
    testmod_names = [
348
        'test_account',
349
        'test_register',
4505.6.25 by Jonathan Lange
Add a test to check what happens if launchpadlib not available.
350
        'test_lp_api',
4797.89.1 by John Arbash Meinel
Cherrypick the launchpad plugin changes for bug #609187.
351
        'test_lp_api_lite',
4776.2.2 by Vincent Ladeuil
Start testing the XMLRPC transport re-implemented on top of _urllib2_wrappers.
352
        'test_lp_directory',
353
        'test_lp_login',
354
        'test_lp_open',
355
        'test_lp_service',
356
        ]
357
    basic_tests.addTest(loader.loadTestsFromModuleNames(
358
            ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
359
    return basic_tests
2245.8.1 by Martin Pool
Start adding tests for launchpad indirection
360
2245.8.6 by Martin Pool
Documentation under 'help launchpad'
361
362
_launchpad_help = """Integration with Launchpad.net
363
364
Launchpad.net provides free Bazaar branch hosting with integrated bug and
365
specification tracking.
366
3031.1.1 by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command.
367
The bzr client (through the plugin called 'launchpad') has special
2245.8.6 by Martin Pool
Documentation under 'help launchpad'
368
features to communicate with Launchpad:
369
3031.1.1 by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command.
370
    * The launchpad-login command tells Bazaar your Launchpad user name. This
371
      is then used by the 'lp:' transport to download your branches using
372
      bzr+ssh://.
373
4258.1.1 by James Westby
Add "--fixes lp:" to the launchpad plugin documentation.
374
    * The 'lp:' transport uses Launchpad as a directory service: for example
375
      'lp:bzr' and 'lp:python' refer to the main branches of the relevant
376
      projects and may be branched, logged, etc. You can also use the 'lp:'
377
      transport to refer to specific branches, e.g. lp:~bzr/bzr/trunk.
378
379
    * The 'lp:' bug tracker alias can expand launchpad bug numbers to their
380
      URLs for use with 'bzr commit --fixes', e.g. 'bzr commit --fixes lp:12345'
381
      will record a revision property that marks that revision as fixing
4258.1.2 by Matt Nordhoff
Fix a typo in the launchpad plugin's help
382
      Launchpad bug 12345. When you push that branch to Launchpad it will
383
      automatically be linked to the bug report.
4258.1.1 by James Westby
Add "--fixes lp:" to the launchpad plugin documentation.
384
3031.1.1 by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command.
385
    * The register-branch command tells Launchpad about the url of a
2245.8.6 by Martin Pool
Documentation under 'help launchpad'
386
      public branch.  Launchpad will then mirror the branch, display
3031.1.1 by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command.
387
      its contents and allow it to be attached to bugs and other
2245.8.6 by Martin Pool
Documentation under 'help launchpad'
388
      objects.
389
390
For more information see http://help.launchpad.net/
391
"""
392
topic_registry.register('launchpad',
393
    _launchpad_help,
394
    'Using Bazaar with Launchpad.net')