Removed the need to set a configuration variable.
This commit is contained in:
		| @@ -1,7 +1,6 @@ | |||||||
| #!/usr/bin/env python | #!/usr/bin/env python | ||||||
|  | # -*- coding: utf-8 -*- | ||||||
| GITSERVEPHP='/home/loa/Projects/indefero/scripts/gitserve.php' | #  | ||||||
|  |  | ||||||
| # ***** BEGIN LICENSE BLOCK ***** | # ***** BEGIN LICENSE BLOCK ***** | ||||||
| # This file is part of InDefero, an open source project management application. | # This file is part of InDefero, an open source project management application. | ||||||
| # Copyright (C) 2008 Céondo Ltd and contributors. | # Copyright (C) 2008 Céondo Ltd and contributors. | ||||||
| @@ -25,7 +24,10 @@ GITSERVEPHP='/home/loa/Projects/indefero/scripts/gitserve.php' | |||||||
| import os | import os | ||||||
| import sys | import sys | ||||||
| import commands | 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])) | status, output = commands.getstatusoutput('php %s %s' % (GITSERVEPHP, sys.argv[1])) | ||||||
| if status == 0: | if status == 0: | ||||||
|     os.execvp('git', ['git', 'shell', '-c', output.strip()]) |     os.execvp('git', ['git', 'shell', '-c', output.strip()]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user