~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hooks.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-15 11:36:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5975.
  • Revision ID: v.ladeuil+lp@free.fr-20110615113605-p7zyyfry9wy1hquc
Make ContentConflict resolution more robust

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    errors,
31
31
    pyutils,
32
32
    )
33
 
from bzrlib.i18n import gettext
34
33
""")
35
34
 
36
35
 
71
70
 
72
71
_builtin_known_hooks = (
73
72
    ('bzrlib.branch', 'Branch.hooks', 'BranchHooks'),
74
 
    ('bzrlib.controldir', 'ControlDir.hooks', 'ControlDirHooks'),
 
73
    ('bzrlib.bzrdir', 'BzrDir.hooks', 'BzrDirHooks'),
75
74
    ('bzrlib.commands', 'Command.hooks', 'CommandHooks'),
76
 
    ('bzrlib.config', 'ConfigHooks', '_ConfigHooks'),
77
75
    ('bzrlib.info', 'hooks', 'InfoHooks'),
78
76
    ('bzrlib.lock', 'Lock.hooks', 'LockHooks'),
79
77
    ('bzrlib.merge', 'Merger.hooks', 'MergeHooks'),
258
256
        try:
259
257
            uninstall = getattr(hook, "uninstall")
260
258
        except AttributeError:
261
 
            raise errors.UnsupportedOperation(self.uninstall_named_hook, self)
 
259
            raise errors.UnsupportedOperation(self.install_named_hook_lazy,
 
260
                self)
262
261
        else:
263
262
            uninstall(label)
264
263
 
311
310
            introduced_string = _format_version_tuple(self.introduced)
312
311
        else:
313
312
            introduced_string = 'unknown'
314
 
        strings.append(gettext('Introduced in: %s') % introduced_string)
 
313
        strings.append('Introduced in: %s' % introduced_string)
315
314
        if self.deprecated:
316
315
            deprecated_string = _format_version_tuple(self.deprecated)
317
 
            strings.append(gettext('Deprecated in: %s') % deprecated_string)
 
316
            strings.append('Deprecated in: %s' % deprecated_string)
318
317
        strings.append('')
319
318
        strings.extend(textwrap.wrap(self.__doc__,
320
319
            break_long_words=False))