~vila/bzr/bzr-email

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: John Arbash Meinel
  • Date: 2007-02-07 22:37:37 UTC
  • Revision ID: john@arbash-meinel.com-20070207223737-deytpas3j166sz72
Can't have a lazy imported object with the identical name as the actual module.
It causes other code to access the member rather than accessing
the module, causing an eventual lazy_import failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
# lazy_import emailer so that it doesn't get loaded if it isn't used
37
37
lazy_import(globals(), """\
38
 
from bzrlib.plugins.email import emailer
 
38
from bzrlib.plugins.email import emailer as _emailer
39
39
""")
40
40
 
41
41
 
43
43
    if not use_legacy:
44
44
        return
45
45
    """This is the post_commit hook that should get run after commit."""
46
 
    emailer.EmailSender(branch, revision_id, branch.get_config()).send_maybe()
 
46
    _emailer.EmailSender(branch, revision_id, branch.get_config()).send_maybe()
47
47
 
48
48
 
49
49
def branch_commit_hook(local, master, old_revno, old_revid, new_revno, new_revid):
50
50
    """This is the post_commit hook that runs after commit."""
51
 
    emailer.EmailSender(master, new_revid, master.get_config()).send_maybe()
 
51
    _emailer.EmailSender(master, new_revid, master.get_config()).send_maybe()
52
52
 
53
53
 
54
54
def install_hooks():