#!/usr/bin/env python

import breezy
from breezy.plugin import load_plugins
load_plugins()
from breezy.plugins.git.server import BzrBackend
from dulwich.server import ReceivePackHandler, serve_command
import sys, os

if len(sys.argv) < 2:
    print >>sys.stderr, "usage: %s <git-dir>" % os.path.basename(sys.argv[0])
    sys.exit(1)

backend = BzrBackend(breezy.transport.get_transport("/"))
sys.exit(serve_command(ReceivePackHandler, backend=backend))
