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/db/py/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/db/py/base.py')
-rw-r--r-- | git/db/py/base.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/git/db/py/base.py b/git/db/py/base.py index cc326c27..74b8beb9 100644 --- a/git/db/py/base.py +++ b/git/db/py/base.py @@ -20,6 +20,7 @@ from git.util import ( is_git_dir ) +from git.index import IndexFile from git.config import GitConfigParser from git.exc import ( BadObject, @@ -35,7 +36,8 @@ import os __all__ = ( 'PureObjectDBR', 'PureObjectDBW', 'PureRootPathDB', 'PureCompoundDB', - 'PureConfigurationMixin', 'PureRepositoryPathsMixin', 'PureAlternatesFileMixin') + 'PureConfigurationMixin', 'PureRepositoryPathsMixin', 'PureAlternatesFileMixin', + 'PureIndexDB') class PureObjectDBR(ObjectDBR): @@ -386,6 +388,16 @@ class PureConfigurationMixin(ConfigurationMixin): #} END interface +class PureIndexDB(IndexDB): + #{ Configuration + IndexCls = IndexFile + #} END configuration + + @property + def index(self): + return self.IndexCls(self) + + class PureAlternatesFileMixin(object): """Utility able to read and write an alternates file through the alternates property It needs to be part of a type with the git_dir or db_path property. |