bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
6622.7.1
by Colin Watson
Remove `bzr register-branch`, since it has not worked for a long time. |
1 |
# Copyright (C) 2006-2017 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 |
|
5459.3.1
by Neil Martinsen-Burrell
add more detailed help for Launchpad plugin |
17 |
"""Launchpad.net integration plugin for Bazaar.
|
18 |
||
19 |
This plugin provides facilities for working with Bazaar branches that are
|
|
7195.5.1
by Martin
Fix remaining whitespace lint in codebase |
20 |
hosted on Launchpad (http://launchpad.net). It provides a directory service
|
5459.3.2
by Neil Martinsen-Burrell
address James Westbys review comments |
21 |
for referring to Launchpad branches using the "lp:" prefix. For example,
|
22 |
lp:bzr refers to the Bazaar's main development branch and
|
|
23 |
lp:~username/project/branch-name can be used to refer to a specific branch.
|
|
24 |
||
25 |
This plugin provides a bug tracker so that "bzr commit --fixes lp:1234" will
|
|
26 |
record that revision as fixing Launchpad's bug 1234.
|
|
27 |
||
28 |
The plugin also provides the following commands:
|
|
29 |
||
30 |
launchpad-login: Show or set the Launchpad user ID
|
|
31 |
launchpad-open: Open a Launchpad branch page in your web browser
|
|
7211.13.4
by Jelmer Vernooij
Remove references to lp-propose. |
32 |
|
5459.3.1
by Neil Martinsen-Burrell
add more detailed help for Launchpad plugin |
33 |
"""
|
0.4.1
by Martin Pool
Start lp-register command |
34 |
|
0.4.17
by Martin Pool
Allow xmlrpc service url to be overridden by $BZR_LP_XMLRPC_URL |
35 |
# The XMLRPC server address can be overridden by setting the environment
|
6622.1.28
by Jelmer Vernooij
More renames; commands in output, environment variables. |
36 |
# variable $BRZ_LP_XMLRPC_URL
|
0.4.17
by Martin Pool
Allow xmlrpc service url to be overridden by $BZR_LP_XMLRPC_URL |
37 |
|
5560.2.1
by Vincent Ladeuil
Fix the remaining references to http://bazaar-vcs.org (except the explicitly historical ones). |
38 |
# see http://wiki.bazaar.canonical.com/Specs/BranchRegistrationTool
|
0.4.9
by Martin Pool
Don't transmit non-standard xmlrpc <nil> value. |
39 |
|
6624
by Jelmer Vernooij
Merge Python3 porting work ('py3 pokes') |
40 |
from ... import ( |
5050.79.5
by John Arbash Meinel
Add a Branch.open hook. |
41 |
branch as _mod_branch, |
6464.1.1
by Jelmer Vernooij
Merge launchpad configuration to config stacks. |
42 |
config as _mod_config, |
5050.79.5
by John Arbash Meinel
Add a Branch.open hook. |
43 |
lazy_regex, |
6622.1.34
by Jelmer Vernooij
Rename brzlib => breezy. |
44 |
# Since we are a built-in plugin we share the breezy version
|
6491.2.1
by Jelmer Vernooij
lazily load launchpad plugin commands. |
45 |
trace, |
7143.11.1
by Jelmer Vernooij
Remove some unused imports. |
46 |
version_info, # noqa: F401 |
5050.79.5
by John Arbash Meinel
Add a Branch.open hook. |
47 |
)
|
6624
by Jelmer Vernooij
Merge Python3 porting work ('py3 pokes') |
48 |
from ...commands import ( |
6491.2.1
by Jelmer Vernooij
lazily load launchpad plugin commands. |
49 |
plugin_cmds, |
5753.2.2
by Jelmer Vernooij
Remove some unnecessary imports, clean up lazy imports. |
50 |
)
|
6624
by Jelmer Vernooij
Merge Python3 porting work ('py3 pokes') |
51 |
from ...directory_service import directories |
52 |
from ...help_topics import topic_registry |
|
6491.2.1
by Jelmer Vernooij
lazily load launchpad plugin commands. |
53 |
|
54 |
for klsname, aliases in [ |
|
55 |
("cmd_launchpad_open", ["lp-open"]), |
|
56 |
("cmd_launchpad_login", ["lp-login"]), |
|
6852.1.1
by Jelmer Vernooij
Add lp-logout command. |
57 |
("cmd_launchpad_logout", ["lp-logout"]), |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
58 |
("cmd_lp_find_proposal", [])]: |
6491.2.1
by Jelmer Vernooij
lazily load launchpad plugin commands. |
59 |
plugin_cmds.register_lazy(klsname, aliases, |
7143.15.2
by Jelmer Vernooij
Run autopep8. |
60 |
"breezy.plugins.launchpad.cmds") |
5546.2.1
by Aaron Bentley
Add lp-find-proposal. |
61 |
|
62 |
||
3251.4.2
by Aaron Bentley
Clean up Launchpad directory service code |
63 |
def _register_directory(): |
6622.1.34
by Jelmer Vernooij
Rename brzlib => breezy. |
64 |
directories.register_lazy('lp:', 'breezy.plugins.launchpad.lp_directory', |
3251.4.2
by Aaron Bentley
Clean up Launchpad directory service code |
65 |
'LaunchpadDirectory', |
66 |
'Launchpad-based directory service',) |
|
7240.11.1
by Jelmer Vernooij
Add support for lp+bzr. |
67 |
directories.register_lazy('lp+bzr:', 'breezy.plugins.launchpad.lp_directory', |
68 |
'LaunchpadDirectory', |
|
69 |
'Bazaar-specific Launchpad directory service',) |
|
5462.4.1
by Barry Warsaw
Added support for ubuntu: and debianlp: schemes, accessing the relevant |
70 |
directories.register_lazy( |
6622.1.34
by Jelmer Vernooij
Rename brzlib => breezy. |
71 |
'debianlp:', 'breezy.plugins.launchpad.lp_directory', |
5462.4.1
by Barry Warsaw
Added support for ubuntu: and debianlp: schemes, accessing the relevant |
72 |
'LaunchpadDirectory', |
73 |
'debianlp: shortcut') |
|
74 |
directories.register_lazy( |
|
6622.1.34
by Jelmer Vernooij
Rename brzlib => breezy. |
75 |
'ubuntu:', 'breezy.plugins.launchpad.lp_directory', |
5462.4.1
by Barry Warsaw
Added support for ubuntu: and debianlp: schemes, accessing the relevant |
76 |
'LaunchpadDirectory', |
77 |
'ubuntu: shortcut') |
|
78 |
||
7143.15.2
by Jelmer Vernooij
Run autopep8. |
79 |
|
3251.4.2
by Aaron Bentley
Clean up Launchpad directory service code |
80 |
_register_directory() |
2245.8.5
by Martin Pool
Add short-form lp:PRODUCT url form |
81 |
|
6625.1.5
by Martin
Drop custom load_tests implementation and use unittest signature |
82 |
def load_tests(loader, basic_tests, pattern): |
4776.2.2
by Vincent Ladeuil
Start testing the XMLRPC transport re-implemented on top of _urllib2_wrappers. |
83 |
testmod_names = [ |
84 |
'test_account', |
|
85 |
'test_register', |
|
4505.6.25
by Jonathan Lange
Add a test to check what happens if launchpadlib not available. |
86 |
'test_lp_api', |
4776.2.2
by Vincent Ladeuil
Start testing the XMLRPC transport re-implemented on top of _urllib2_wrappers. |
87 |
'test_lp_directory', |
88 |
'test_lp_login', |
|
89 |
'test_lp_open', |
|
90 |
'test_lp_service', |
|
91 |
]
|
|
92 |
basic_tests.addTest(loader.loadTestsFromModuleNames( |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
93 |
["%s.%s" % (__name__, tmn) for tmn in testmod_names])) |
4776.2.2
by Vincent Ladeuil
Start testing the XMLRPC transport re-implemented on top of _urllib2_wrappers. |
94 |
return basic_tests |
2245.8.1
by Martin Pool
Start adding tests for launchpad indirection |
95 |
|
2245.8.6
by Martin Pool
Documentation under 'help launchpad' |
96 |
|
97 |
_launchpad_help = """Integration with Launchpad.net |
|
98 |
||
99 |
Launchpad.net provides free Bazaar branch hosting with integrated bug and
|
|
100 |
specification tracking.
|
|
101 |
||
3031.1.1
by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command. |
102 |
The bzr client (through the plugin called 'launchpad') has special
|
2245.8.6
by Martin Pool
Documentation under 'help launchpad' |
103 |
features to communicate with Launchpad:
|
104 |
||
3031.1.1
by jml at canonical
Expand the documentation on lp:// URLs and mention the launchpad-login command. |
105 |
* The launchpad-login command tells Bazaar your Launchpad user name. This
|
106 |
is then used by the 'lp:' transport to download your branches using
|
|
107 |
bzr+ssh://.
|
|
108 |
||
4258.1.1
by James Westby
Add "--fixes lp:" to the launchpad plugin documentation. |
109 |
* The 'lp:' transport uses Launchpad as a directory service: for example
|
110 |
'lp:bzr' and 'lp:python' refer to the main branches of the relevant
|
|
111 |
projects and may be branched, logged, etc. You can also use the 'lp:'
|
|
112 |
transport to refer to specific branches, e.g. lp:~bzr/bzr/trunk.
|
|
113 |
||
114 |
* The 'lp:' bug tracker alias can expand launchpad bug numbers to their
|
|
115 |
URLs for use with 'bzr commit --fixes', e.g. 'bzr commit --fixes lp:12345'
|
|
116 |
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 |
117 |
Launchpad bug 12345. When you push that branch to Launchpad it will
|
118 |
automatically be linked to the bug report.
|
|
4258.1.1
by James Westby
Add "--fixes lp:" to the launchpad plugin documentation. |
119 |
|
2245.8.6
by Martin Pool
Documentation under 'help launchpad' |
120 |
For more information see http://help.launchpad.net/
|
121 |
"""
|
|
122 |
topic_registry.register('launchpad', |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
123 |
_launchpad_help, |
124 |
'Using Bazaar with Launchpad.net') |
|
7490.39.1
by Jelmer Vernooij
Move launchpad support from propose into launchpad plugin. |
125 |
|
126 |
||
127 |
from ...propose import hosters |
|
128 |
hosters.register_lazy("launchpad", __name__ + '.hoster', "Launchpad") |