~ubuntu-branches/debian/jessie/bzr-git/jessie

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2011-11-03 14:22:00 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20111103142200-rada3nkdyq1scodj
Tags: 0.6.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
    update_git_cache(master_branch.repository, new_revid)
427
427
 
428
428
 
 
429
def loggerhead_git_hook(branch_app, environ):
 
430
    branch = branch_app.branch
 
431
    if branch.get_config().get_user_option('http_git') != 'True':
 
432
        return None
 
433
    from bzrlib.plugins.git.server import git_http_hook
 
434
    return git_http_hook(branch, environ['REQUEST_METHOD'],
 
435
        environ['PATH_INFO'])
 
436
 
429
437
try:
430
438
    from bzrlib.hooks import install_lazy_named_hook
431
439
except ImportError: # Compatibility with bzr < 2.4
434
442
    install_lazy_named_hook("bzrlib.branch",
435
443
        "Branch.hooks", "post_commit", post_commit_update_cache,
436
444
        "git cache")
 
445
    install_lazy_named_hook("bzrlib.plugins.loggerhead.apps.branch",
 
446
        "BranchWSGIApp.hooks", "controller",
 
447
        loggerhead_git_hook, "git support")
437
448
 
438
449
 
439
450
def test_suite():