/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bin/dul-daemon

  • Committer: Jelmer Vernooij
  • Date: 2009-01-14 18:24:38 UTC
  • mto: (0.222.3 dulwich)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090114182438-c0tn5eczyupi4ztn
Fix download url, add version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# dul-daemon - Simple git-daemon a like
 
3
# Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
 
4
 
5
# This program is free software; you can redistribute it and/or
 
6
# modify it under the terms of the GNU General Public License
 
7
# as published by the Free Software Foundation; version 2
 
8
# of the License.
 
9
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
# GNU General Public License for more details.
 
14
 
15
# You should have received a copy of the GNU General Public License
 
16
# along with this program; if not, write to the Free Software
 
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
18
# MA  02110-1301, USA.
 
19
 
 
20
import sys
 
21
from dulwich.server import GitBackend, TCPGitServer
 
22
 
 
23
if __name__ == "__main__":
 
24
    gitdir = None
 
25
    if len(sys.argv) > 1:
 
26
        gitdir = sys.argv[1]
 
27
 
 
28
    backend = GitBackend(gitdir)
 
29
    server = TCPGitServer(backend, 'localhost')
 
30
    server.serve_forever()