diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-05-30 01:23:28 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-05-30 01:23:28 +0200 |
commit | 112bb1672d6b28f203e7839e320b985486636800 (patch) | |
tree | 755fb8dcab211678697f6e03cf37122592b7c573 /git/repo/base.py | |
parent | 0996049122842a343e0ea7fbbecafddb2b4ba9d3 (diff) | |
download | gitpython-112bb1672d6b28f203e7839e320b985486636800.tar.gz |
Finished moving all repository methods to the respective interfaces and implementations. It seems theoretically work together now, although it clearly is much more complex than ever before.
The repo package was slimmed down to being a module once again, which is only there for compatability actually
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/git/repo/base.py b/git/repo/base.py deleted file mode 100644 index 0f86a6bf..00000000 --- a/git/repo/base.py +++ /dev/null @@ -1,78 +0,0 @@ -# repo.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors -# -# This module is part of GitPython and is released under -# the BSD License: http://www.opensource.org/licenses/bsd-license.php - -from git.exc import InvalidGitRepositoryError, NoSuchPathError -from git.cmd import Git -from git.util import Actor -from git.refs import * -from git.index import IndexFile -from git.objects import * -from git.config import GitConfigParser -from git.remote import Remote -from git.db.cmd import CmdCompatibilityGitDB -from git.db.py import PureGitDB - - -from git.util import ( - join, - isfile, - hex_to_bin - ) - -from fun import ( - is_git_dir, - touch - ) - -import os -import sys -import re - -import warnings - -DefaultDBType = PureGitDB -if sys.version_info[1] < 5: # python 2.4 compatiblity - DefaultDBType = CmdGitDB -# END handle python 2.4 - - -__all__ = ('Repo', ) - - -class Repo(CmdCompatibilityGitDB): - """Represents a git repository and allows you to query references, - gather commit information, generate diffs, create and clone repositories query - the log. - - The following attributes are worth using: - - 'working_dir' is the working directory of the git command, wich is the working tree - directory if available or the .git directory in case of bare repositories - - 'working_tree_dir' is the working tree directory, but will raise AssertionError - if we are a bare repository. - - 'git_dir' is the .git repository directoy, which is always set.""" - - def __init__(self, path=None, odbt = None): - """Create a new Repo instance - - :param path: is the path to either the root git directory or the bare git repo:: - - repo = Repo("/Users/mtrier/Development/git-python") - repo = Repo("/Users/mtrier/Development/git-python.git") - repo = Repo("~/Development/git-python.git") - repo = Repo("$REPOSITORIES/Development/git-python.git") - :raise InvalidDBRoot: - :return: git.Repo """ - if odbt is not None: - warnings.warn("deprecated use of odbt", DeprecationWarning) - #END handle old parameter - super(Repo, self).__init__(path) - self._git = Git(self.working_dir) - - def __repr__(self): - return '<git.Repo "%s">' % self.git_dir |