From 024adf37acddd6a5d8293b6b5d15795c59a142c0 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 30 May 2011 13:06:37 +0200 Subject: Fixed tests far enough to allow basic repository tests to be applied to any of the new database types. This reduces code duplication to the mere minimum, but allows custom tests to be added on top easily and flexibly --- git/db/py/__init__.py | 2 -- git/db/py/complex.py | 4 ++-- git/db/py/resolve.py | 13 ++++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'git/db/py') diff --git a/git/db/py/__init__.py b/git/db/py/__init__.py index 73cc2bdf..8a681e42 100644 --- a/git/db/py/__init__.py +++ b/git/db/py/__init__.py @@ -2,5 +2,3 @@ # # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php - -from complex import * diff --git a/git/db/py/complex.py b/git/db/py/complex.py index efcbb2ba..9d891537 100644 --- a/git/db/py/complex.py +++ b/git/db/py/complex.py @@ -20,7 +20,7 @@ from pack import PurePackedODB from ref import PureReferenceDB from submodule import PureSubmoduleDB -from git.db.compat import RepoCompatInterface +from git.db.compat import RepoCompatibilityInterface from git.util import ( LazyMixin, @@ -123,6 +123,6 @@ class PureGitDB(PureGitODB, -class PureCompatibilityGitDB(PureGitDB, RepoCompatInterface): +class PureCompatibilityGitDB(PureGitDB, RepoCompatibilityInterface): """Pure git database with a compatability layer required by 0.3x code""" diff --git a/git/db/py/resolve.py b/git/db/py/resolve.py index d0685747..7194149c 100644 --- a/git/db/py/resolve.py +++ b/git/db/py/resolve.py @@ -3,12 +3,19 @@ version assuming compatible interface for reference and object types""" from git.db.interface import ReferencesMixin from git.exc import BadObject -from git.refs import SymbolicReference -from git.objects.base import Object -from git.objects.commit import Commit +from git.refs import ( + SymbolicReference, + Reference, + HEAD, + Head, + TagReference + ) from git.refs.head import HEAD from git.refs.headref import Head from git.refs.tag import TagReference + +from git.objects.base import Object +from git.objects.commit import Commit from git.util import ( join, isdir, -- cgit v1.2.1