~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

Use global osutils, otherwise it creates a local var.

Which works, but causes us to run the import on every call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from StringIO import StringIO
19
19
import re
20
20
 
 
21
from bzrlib import lazy_import
 
22
lazy_import.lazy_import(globals(), """
21
23
from bzrlib import (
22
24
    branch as _mod_branch,
23
25
    diff,
35
37
    serializer as bundle_serializer,
36
38
    )
37
39
from bzrlib.email_message import EmailMessage
 
40
""")
38
41
 
39
42
 
40
43
class MergeRequestBodyParams(object):
56
59
    """Hooks for MergeDirective classes."""
57
60
 
58
61
    def __init__(self):
59
 
        hooks.Hooks.__init__(self)
60
 
        self.create_hook(hooks.HookPoint('merge_request_body',
 
62
        hooks.Hooks.__init__(self, "bzrlib.merge_directive", "BaseMergeDirective.hooks")
 
63
        self.add_hook('merge_request_body',
61
64
            "Called with a MergeRequestBodyParams when a body is needed for"
62
65
            " a merge request.  Callbacks must return a body.  If more"
63
66
            " than one callback is registered, the output of one callback is"
64
 
            " provided to the next.", (1, 15, 0), False))
 
67
            " provided to the next.", (1, 15, 0))
65
68
 
66
69
 
67
70
class BaseMergeDirective(object):