~ubuntu-branches/ubuntu/natty/dulwich/natty

« back to all changes in this revision

Viewing changes to .pc/debian-changes-0.6.0-1/bin/dul-daemon

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-05-24 16:13:32 UTC
  • mfrom: (8.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100524161332-qt2hbzbi4413lcyk
Tags: 0.6.0-2
Add dependency on git, required for the testsuite. Closes: #582740

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
 
# or (at your option) a later version 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.repo import Repo
22
 
from dulwich.server import DictBackend, TCPGitServer
23
 
 
24
 
if __name__ == "__main__":
25
 
    if len(sys.argv) > 1:
26
 
        gitdir = sys.argv[1]
27
 
    else:
28
 
        gitdir = "."
29
 
 
30
 
    backend = DictBackend({"/": Repo(gitdir)})
31
 
    server = TCPGitServer(backend, 'localhost')
32
 
    server.serve_forever()