Merge lp://staging/~garyvdm/bzr-pipeline/decoratemerge into lp://staging/bzr-pipeline

Proposed by Gary van der Merwe
Status: Work in progress
Proposed branch: lp://staging/~garyvdm/bzr-pipeline/decoratemerge
Merge into: lp://staging/bzr-pipeline
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~garyvdm/bzr-pipeline/decoratemerge
Reviewer Review Type Date Requested Status
Aaron Bentley Needs Fixing
Review via email: mp+8432@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

I've submited a fix to bzr to allow lazily registered commands to override existing commands. The patch get bzr-pipeline to use that if it is available.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gary van der Merwe wrote:
> Gary van der Merwe has proposed merging lp:~garyvdm/bzr-pipeline/decoratemerge into lp:bzr-pipeline.
>
> Requested reviews:
> Aaron Bentley (abentley)
>
> I've submited a fix to bzr to allow lazily registered commands to override existing commands. The patch get bzr-pipeline to use that if it is available.

So this means Qbzr or pipeline will register a 'merge' command, and the
other one will silently fail?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpVNjwACgkQ0F+nu1YWqI2n2wCcD8jyep804K2QzwjYfdlvlY6D
BIwAmQFTOS1mAvRgW52rI88TFoHjXzih
=13BH
-----END PGP SIGNATURE-----

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

> So this means Qbzr or pipeline will register a 'merge' command, and the
> other one will silently fail?

Ah - that's not what we want...

Revision history for this message
Aaron Bentley (abentley) wrote :

> > So this means Qbzr or pipeline will register a 'merge' command, and the
> > other one will silently fail?
>
> Ah - that's not what we want...

I think having multiple plugins trying to alter the same command is unlikely to work well, but even if it did, this particular implementation needs improvement.

review: Needs Fixing
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

On Mon, Jul 13, 2009 at 10:21 PM, Aaron Bentley<email address hidden> wrote:
> I think having multiple plugins trying to alter the same command is unlikely to work well, but even if it did, this particular implementation needs improvement.

Yes - This problem is more complicated than I originally thought, But
I'm sure that it is possible to resolve. I'll continue to work on it.

Unmerged revisions

93. By Gary van der Merwe

Decorate the merge command (if the patch to bzrlib is availible)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '__init__.py'
2--- __init__.py 2009-06-29 01:53:09 +0000
3+++ __init__.py 2009-07-08 23:59:28 +0000
4@@ -79,15 +79,21 @@
5 api.require_any_api(bzrlib, [(1, x, 0) for x in range(15, 18)])
6
7
8-def register(name):
9- plugin_cmds.register_lazy(name, [], 'bzrlib.plugins.pipeline.commands')
10+def register(name, decorate=False):
11+ if decorate:
12+ import inspect
13+ if "decorate" in inspect.getargspec(plugin_cmds.register_lazy)[0]:
14+ return plugin_cmds.register_lazy(name, [],
15+ 'bzrlib.plugins.pipeline.commands', decorate=decorate)
16+
17+ return plugin_cmds.register_lazy(name, [], 'bzrlib.plugins.pipeline.commands')
18
19 register('cmd_add_pipe')
20 register('cmd_remove_pipe')
21 register('cmd_switch_pipe')
22 register('cmd_show_pipeline')
23 register('cmd_pump')
24-register('cmd_merge')
25+register('cmd_merge', decorate=True)
26 register('cmd_reconfigure_pipeline')
27 register('cmd_sync_pipeline')
28 plugin_cmds.register_lazy('cmd_import_loom', [],

Subscribers

People subscribed via source and target branches