Removed the need to set a configuration variable.

This commit is contained in:
Loic d'Anterroches 2009-01-19 20:54:49 +01:00
parent 941a495144
commit e21b4d87b9

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python
GITSERVEPHP='/home/loa/Projects/indefero/scripts/gitserve.php'
# -*- coding: utf-8 -*-
#
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008 Céondo Ltd and contributors.
@ -25,7 +24,10 @@ GITSERVEPHP='/home/loa/Projects/indefero/scripts/gitserve.php'
import os
import sys
import commands
import traceback
n = len("/gitserve.py")
GITSERVEPHP = '%s/gitserve.php' % traceback.extract_stack(limit=1)[0][0][0:-n]
status, output = commands.getstatusoutput('php %s %s' % (GITSERVEPHP, sys.argv[1]))
if status == 0:
os.execvp('git', ['git', 'shell', '-c', output.strip()])