/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-29 13:15:14 UTC
  • mfrom: (786.1.1 register-lazy)
  • Revision ID: jelmer@samba.org-20120329131514-knrl1w2wzntx89rv
Use lazy registration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
import bzrlib
55
55
import bzrlib.api
56
 
from bzrlib import (
57
 
    config,
58
 
    )
59
56
from bzrlib.commands import plugin_cmds
60
57
 
61
58
from bzrlib.plugins.gtk.info import (
144
141
    install_lazy_named_hook("bzrlib.branch", "Branch.hooks",
145
142
        'post_uncommit', save_commit_messages, "Saving commit messages for gcommit")
146
143
 
 
144
try:
 
145
    from bzrlib.registry import register_lazy
 
146
except ImportError:
 
147
    from bzrlib import config
 
148
    option_registry = getattr(config, "option_registry", None)
 
149
    if option_registry is not None:
 
150
        config.option_registry.register_lazy('nautilus_integration',
 
151
                'bzrlib.plugins.gtk.config', 'opt_nautilus_integration')
 
152
else:
 
153
    register_lazy("bzrlib.config", "option_registry",
 
154
        'nautilus_integration', 'bzrlib.plugins.gtk.config',
 
155
        'opt_nautilus_integration')
147
156
 
148
 
option_registry = getattr(config, "option_registry", None)
149
 
if option_registry is not None:
150
 
    config.option_registry.register_lazy('nautilus_integration',
151
 
            'bzrlib.plugins.gtk.config', 'opt_nautilus_integration')
152
157
 
153
158
def load_tests(basic_tests, module, loader):
154
159
    testmod_names = [