#!/usr/pkg/bin/python3.13

import os
import sys

from dulwich.server import ReceivePackHandler, serve_command

import breezy
import breezy.bzr
import breezy.git
from breezy.git.server import BzrBackend

if len(sys.argv) < 2:
    print("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))
