35
35
pipe-patches Export the pipeline as a collection of patches,
37
lp-submit Submit the specified pipe to Launchpad
38
37
==================== =======================================================
40
39
It also extends `merge --uncommitted` to work with pipes.
112
111
from bzrlib.directory_service import AliasDirectory, directories
115
supported_bzrlib_version = [(2, x, 0) for x in range(1, 2)]
114
supported_bzrlib_version = [(2, x, 0) for x in range(2, 3)]
116
115
api.require_any_api(bzrlib, supported_bzrlib_version)
125
124
register('cmd_add_pipe')
126
125
register('cmd_remove_pipe')
126
register('cmd_rename_pipe')
127
127
register('cmd_switch_pipe', ['swp'])
128
register('cmd_store')
128
129
register('cmd_show_pipeline', ['pipes'])
129
130
register('cmd_pipe_patches')
130
131
register('cmd_pump')
131
132
register('cmd_merge')
132
133
register('cmd_reconfigure_pipeline')
133
134
register('cmd_sync_pipeline')
134
register('cmd_lp_submit')
135
135
plugin_cmds.register_lazy('cmd_import_loom', [],
136
136
'bzrlib.plugins.pipeline.loom')
157
157
directories.register(':', PipeAliasDirectory,
158
158
'Easy access to remembered branch locations')
161
from bzrlib.plugins.launchpad import lp_api
162
from bzrlib.plugins.launchpad import lp_propose
166
def get_prerequisite_from_pipe(hook_params):
167
from bzrlib.plugins.pipeline.pipeline import PipeManager
168
source_branch = hook_params['source_branch']
169
launchpad = hook_params['launchpad']
170
manager = PipeManager(source_branch.bzr)
171
prev_pipe = manager.get_prev_pipe()
172
if prev_pipe is not None:
173
prerequisite_branch = lp_api.LaunchpadBranch.from_bzr(launchpad,
175
if (prerequisite_branch.lp.bzr_identity
176
== hook_params['target_branch'].lp.bzr_identity):
177
prerequisite_branch = None
179
prerequisite_branch = None
180
return prerequisite_branch
183
# XXX: When we move the pipeline command, we should make sure it
184
# constructs Submitter correctly.
185
lp_propose.Proposer.hooks.install_named_hook(
186
'get_prerequisite', get_prerequisite_from_pipe,
187
'Get the prerequisite from the pipeline')
161
190
def test_suite():
162
191
from bzrlib.tests.TestUtil import TestLoader, TestSuite