* dulwich.pack.write_pack_index_v{1,2} now take a file-like object
rather than a filename. (Jelmer Vernooij)
+ * Make dul-daemon a trivial wrapper around server functionality.
+ (Dave Borowitz)
+
0.6.0 2010-05-22
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
-import sys
-from dulwich.log_utils import default_logging_config
-from dulwich.repo import Repo
-from dulwich.server import DictBackend, TCPGitServer
+from dulwich.server import main
-if __name__ == "__main__":
- if len(sys.argv) > 1:
- gitdir = sys.argv[1]
- else:
- gitdir = "."
-
- default_logging_config()
- backend = DictBackend({"/": Repo(gitdir)})
- server = TCPGitServer(backend, 'localhost')
- server.serve_forever()
+if __name__ == '__main__':
+ main()
extract_capabilities,
extract_want_line_capabilities,
)
+from dulwich.repo import (
+ Repo,
+ )
logger = log_utils.getLogger(__name__)
def handle_error(self, request, client_address):
logger.exception('Exception happened during processing of request '
'from %s', client_address)
+
+
+def main(argv=sys.argv):
+ """Entry point for starting a TCP git server."""
+ if len(argv) > 1:
+ gitdir = argv[1]
+ else:
+ gitdir = '.'
+
+ log_utils.default_logging_config()
+ backend = DictBackend({'/': Repo(gitdir)})
+ server = TCPGitServer(backend, 'localhost')
+ server.serve_forever()