File: bzr-upload-pack

package info (click to toggle)
bzr-git 0.6.9-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 788 kB
  • sloc: python: 10,636; makefile: 67; sh: 6
file content (15 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python

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

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

backend = BzrBackend(bzrlib.transport.get_transport("/"))
sys.exit(serve_command(UploadPackHandler, backend=backend))