shelf_ui import bzrtools even when --no-plugins is required

Bug #296620 reported by Vincent Ladeuil
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Vincent Ladeuil
BzrTools
Triaged
Undecided
Unassigned

Bug Description

...and also make the test suite fails.

Try the following for ~fun :
bzr selftest --no-plugins bzrtools --list

Which by definition should list 0 tests...

It's due to shelf_ui importing bzrlib.plugins.bzrtools.

I think it's a bad idea to have bzr depends on an external plugin (whatever the reason).

So far, plugins can well... plug into bzr when they want to offer additional features.

bzr can import additional libraries for its own needs, but none will plug into bzr back.

I'll try to propose a patch to both bzr core and bzrtools asap,

In the mean time commenting offending import line is an effective work-around

Related branches

Revision history for this message
Matthew Fuller (fullermd) wrote :

Bug 296125 relates to one place this is used.

Revision history for this message
Vincent Ladeuil (vila) wrote :

The bzrtools related part of the fix: add colordiff support if bzr seems to provides shelf_ui.

fullermd: *you* don't want that patch if my other fix is applied to bzr :)

Changed in bzr:
assignee: nobody → vila
status: New → In Progress
Changed in bzrtools:
assignee: nobody → vila
status: New → In Progress
Revision history for this message
Aaron Bentley (abentley) wrote :

This approach makes it *harder* to fix bug 296125, because if any plugin can supply shelf_ui.diff_writer, there's no way to know whether it produces colourized output.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 296620] Re: shelf_ui import bzrtools even when --no-plugins is required

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

Aaron Bentley wrote:
> This approach makes it *harder* to fix bug 296125, because if any plugin
> can supply shelf_ui.diff_writer, there's no way to know whether it
> produces colourized output.
>

Why not change the DiffWriter interface to include:
"allow_colored=True/False".

Or alternatively, have the disable code just unilaterally disable the
non-native diff_writer. For the common case that a plugin is providing
colordiff, then it will have disabled coloring. For other cases, we
don't have to provide another option to disable whatever wackyness that
plugin provides.

John
=:->

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

iEYEARECAAYFAkkaKYsACgkQJdeBCYSNAAPWLACgwKB91RlhfkkEpHGGM2xqVD8I
UFkAniSUumjroB0fmmP60CGcAjF8BOlY
=WJAK
-----END PGP SIGNATURE-----

Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Released
Vincent Ladeuil (vila)
Changed in bzrtools:
assignee: vila → nobody
Jelmer Vernooij (jelmer)
Changed in bzrtools:
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.