From 112bb1672d6b28f203e7839e320b985486636800 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 30 May 2011 01:23:28 +0200 Subject: 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 --- git/db/py/base.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'git/db/py/base.py') 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. -- cgit v1.2.1