diff options
author | Tommi Virtanen <tv@eagain.net> | 2007-11-15 20:56:15 +0200 |
---|---|---|
committer | Tommi Virtanen <tv@eagain.net> | 2007-11-15 20:56:15 +0200 |
commit | a2e54704265b58abaa7a6edd0b64548974c69334 (patch) | |
tree | a78c9bc4e54cba195a12805917217ecce1ed3aca /gitosis/repository.py | |
parent | Fix copy-paste that made gitosis.gitweb use wrong logger. (diff) | |
download | gitosis-dakkar-a2e54704265b58abaa7a6edd0b64548974c69334.tar.gz gitosis-dakkar-a2e54704265b58abaa7a6edd0b64548974c69334.tar.bz2 gitosis-dakkar-a2e54704265b58abaa7a6edd0b64548974c69334.zip |
Create leading directories when creating missing repos in gitosis-serve.
Creation is in gitosis.serve and not directly in repository.init(),
because that's the location that can tell what part of the directory
tree is allowed to be missing. Made the reconstructed git command
include the extension as that was easier to do.
haveAccess return value is now tuple, to preserve information on what
parts of the path can be missing.
Diffstat (limited to 'gitosis/repository.py')
-rw-r--r-- | gitosis/repository.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gitosis/repository.py b/gitosis/repository.py index 8746144..4b7ff2b 100644 --- a/gitosis/repository.py +++ b/gitosis/repository.py @@ -20,6 +20,19 @@ def init( template=None, _git=None, ): + """ + Create a git repository at C{path} (if missing). + + Leading directories of C{path} must exist. + + @param path: Path of repository create. + + @type path: str + + @param template: Template directory, to pass to C{git init}. + + @type template: str + """ if _git is None: _git = 'git' |