diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-21 21:47:18 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-21 22:00:45 +0100 |
commit | 48a17c87c15b2fa7ce2e84afa09484f354d57a39 (patch) | |
tree | 8664414605c3b8f5176c144c18e5f4b9d0715852 | |
parent | 0b813371f5a8af95152cae109d28c7c97bfaf79f (diff) | |
parent | 6befb28efd86556e45bb0b213bcfbfa866cac379 (diff) | |
download | gitpython-48a17c87c15b2fa7ce2e84afa09484f354d57a39.tar.gz |
-#######->WARNING<-####### Directory structure changed, see commit message
If you use git-python as a submodule of your own project, which alters the sys.path to import it,
you will have to adjust your code to take the changed directory structure into consideration.
Previously, you would put the path
./git-python/lib
into your syspath. All modules moved two levels up, which means that the 'git-python' directory
now is a package itself. This implies that the submodule's path must change so that the root
directory is called 'git'.
Your code must now put the directory containing the submodule into the sys.path.
For example, if you previously would have the following configuration:
./ext/git-python/lib/git/__init__.py
you would now change your submodule path to the following:
./ext/git
On the latets revision, the directory structure is changed so that
the git/__init__.py file is at the following path:
./ext/git/__init__.py
To be able to import git, you need to put ./ext into your sys.path.
-rw-r--r-- | .gitmodules | 6 | ||||
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | __init__.py (renamed from lib/git/__init__.py) | 0 | ||||
-rw-r--r-- | cmd.py (renamed from lib/git/cmd.py) | 0 | ||||
-rw-r--r-- | config.py (renamed from lib/git/config.py) | 0 | ||||
-rw-r--r-- | db.py (renamed from lib/git/db.py) | 0 | ||||
-rw-r--r-- | diff.py (renamed from lib/git/diff.py) | 0 | ||||
-rw-r--r-- | doc/source/changes.rst | 6 | ||||
-rw-r--r-- | exc.py (renamed from lib/git/exc.py) | 0 | ||||
m--------- | ext/gitdb (renamed from lib/git/ext/gitdb) | 0 | ||||
-rw-r--r-- | index/__init__.py (renamed from lib/git/index/__init__.py) | 0 | ||||
-rw-r--r-- | index/base.py (renamed from lib/git/index/base.py) | 0 | ||||
-rw-r--r-- | index/fun.py (renamed from lib/git/index/fun.py) | 0 | ||||
-rw-r--r-- | index/typ.py (renamed from lib/git/index/typ.py) | 0 | ||||
-rw-r--r-- | index/util.py (renamed from lib/git/index/util.py) | 0 | ||||
-rw-r--r-- | objects/__init__.py (renamed from lib/git/objects/__init__.py) | 0 | ||||
-rw-r--r-- | objects/base.py (renamed from lib/git/objects/base.py) | 0 | ||||
-rw-r--r-- | objects/blob.py (renamed from lib/git/objects/blob.py) | 0 | ||||
-rw-r--r-- | objects/commit.py (renamed from lib/git/objects/commit.py) | 0 | ||||
-rw-r--r-- | objects/fun.py (renamed from lib/git/objects/fun.py) | 0 | ||||
-rw-r--r-- | objects/submodule/__init__.py (renamed from lib/git/objects/submodule/__init__.py) | 0 | ||||
-rw-r--r-- | objects/submodule/base.py (renamed from lib/git/objects/submodule/base.py) | 0 | ||||
-rw-r--r-- | objects/submodule/root.py (renamed from lib/git/objects/submodule/root.py) | 0 | ||||
-rw-r--r-- | objects/submodule/util.py (renamed from lib/git/objects/submodule/util.py) | 0 | ||||
-rw-r--r-- | objects/tag.py (renamed from lib/git/objects/tag.py) | 0 | ||||
-rw-r--r-- | objects/tree.py (renamed from lib/git/objects/tree.py) | 0 | ||||
-rw-r--r-- | objects/util.py (renamed from lib/git/objects/util.py) | 0 | ||||
-rw-r--r-- | odict.py (renamed from lib/git/odict.py) | 0 | ||||
-rw-r--r-- | refs.py (renamed from lib/git/refs.py) | 0 | ||||
-rw-r--r-- | remote.py (renamed from lib/git/remote.py) | 0 | ||||
-rw-r--r-- | repo/__init__.py (renamed from lib/git/repo/__init__.py) | 0 | ||||
-rw-r--r-- | repo/base.py (renamed from lib/git/repo/base.py) | 0 | ||||
-rw-r--r-- | repo/fun.py (renamed from lib/git/repo/fun.py) | 0 | ||||
-rwxr-xr-x | setup.py | 119 | ||||
-rw-r--r-- | test/git/__init__.py | 5 | ||||
-rw-r--r-- | test/lib/__init__.py (renamed from test/testlib/__init__.py) | 0 | ||||
-rw-r--r-- | test/lib/asserts.py (renamed from test/testlib/asserts.py) | 0 | ||||
-rw-r--r-- | test/lib/helper.py (renamed from test/testlib/helper.py) | 0 | ||||
-rw-r--r-- | test/performance/lib.py (renamed from test/git/performance/lib.py) | 2 | ||||
-rw-r--r-- | test/performance/test_commit.py (renamed from test/git/performance/test_commit.py) | 2 | ||||
-rw-r--r-- | test/performance/test_odb.py (renamed from test/git/performance/test_odb.py) | 0 | ||||
-rw-r--r-- | test/performance/test_streams.py (renamed from test/git/performance/test_streams.py) | 2 | ||||
-rw-r--r-- | test/performance/test_utils.py (renamed from test/git/performance/test_utils.py) | 0 | ||||
-rw-r--r-- | test/test_actor.py (renamed from test/git/test_actor.py) | 2 | ||||
-rw-r--r-- | test/test_base.py (renamed from test/git/test_base.py) | 2 | ||||
-rw-r--r-- | test/test_blob.py (renamed from test/git/test_blob.py) | 2 | ||||
-rw-r--r-- | test/test_commit.py (renamed from test/git/test_commit.py) | 2 | ||||
-rw-r--r-- | test/test_config.py (renamed from test/git/test_config.py) | 2 | ||||
-rw-r--r-- | test/test_db.py (renamed from test/git/test_db.py) | 2 | ||||
-rw-r--r-- | test/test_diff.py (renamed from test/git/test_diff.py) | 2 | ||||
-rw-r--r-- | test/test_fun.py (renamed from test/git/test_fun.py) | 2 | ||||
-rw-r--r-- | test/test_git.py (renamed from test/git/test_git.py) | 2 | ||||
-rw-r--r-- | test/test_index.py (renamed from test/git/test_index.py) | 2 | ||||
-rw-r--r-- | test/test_refs.py (renamed from test/git/test_refs.py) | 2 | ||||
-rw-r--r-- | test/test_remote.py (renamed from test/git/test_remote.py) | 2 | ||||
-rw-r--r-- | test/test_repo.py (renamed from test/git/test_repo.py) | 2 | ||||
-rw-r--r-- | test/test_stats.py (renamed from test/git/test_stats.py) | 2 | ||||
-rw-r--r-- | test/test_submodule.py (renamed from test/git/test_submodule.py) | 10 | ||||
-rw-r--r-- | test/test_tree.py (renamed from test/git/test_tree.py) | 2 | ||||
-rw-r--r-- | test/test_util.py (renamed from test/git/test_util.py) | 2 | ||||
-rw-r--r-- | util.py (renamed from lib/git/util.py) | 0 |
61 files changed, 96 insertions, 90 deletions
diff --git a/.gitmodules b/.gitmodules index 3560dc4e..70a60616 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "gitdb"]
- path = lib/git/ext/gitdb
- url = git://gitorious.org/git-python/gitdb.git
+[submodule "gitdb"] + path = ext/gitdb + url = git://gitorious.org/git-python/gitdb.git diff --git a/MANIFEST.in b/MANIFEST.in index e01ae090..8917827d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,3 +3,5 @@ include LICENSE include CHANGES include AUTHORS include README + +graft test/fixtures diff --git a/lib/git/__init__.py b/__init__.py index 7f275b44..7f275b44 100644 --- a/lib/git/__init__.py +++ b/__init__.py diff --git a/lib/git/config.py b/config.py index f1a8832e..f1a8832e 100644 --- a/lib/git/config.py +++ b/config.py diff --git a/lib/git/diff.py b/diff.py index 48253c42..48253c42 100644 --- a/lib/git/diff.py +++ b/diff.py diff --git a/doc/source/changes.rst b/doc/source/changes.rst index ae51c9d9..563fb46b 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -2,6 +2,12 @@ Changelog ========= +0.3.2 Beta 1 +============ +* Flattened directory structure to make development more convenient. + + * .. note:: This alters the way projects using git-python as a submodule have to adjust their sys.path to be able to import git-python successfully. + 0.3.1 Beta 1 ============ * Full Submodule-Support diff --git a/lib/git/ext/gitdb b/ext/gitdb -Subproject 1bc281d31b8d31fd4dcbcd9b441b5c7b2c1b0bb +Subproject 1bc281d31b8d31fd4dcbcd9b441b5c7b2c1b0bb diff --git a/lib/git/index/__init__.py b/index/__init__.py index fe4a7f59..fe4a7f59 100644 --- a/lib/git/index/__init__.py +++ b/index/__init__.py diff --git a/lib/git/index/base.py b/index/base.py index 05caa06d..05caa06d 100644 --- a/lib/git/index/base.py +++ b/index/base.py diff --git a/lib/git/index/fun.py b/index/fun.py index 87fdf1a9..87fdf1a9 100644 --- a/lib/git/index/fun.py +++ b/index/fun.py diff --git a/lib/git/index/typ.py b/index/typ.py index ad988285..ad988285 100644 --- a/lib/git/index/typ.py +++ b/index/typ.py diff --git a/lib/git/index/util.py b/index/util.py index bd5fcc03..bd5fcc03 100644 --- a/lib/git/index/util.py +++ b/index/util.py diff --git a/lib/git/objects/__init__.py b/objects/__init__.py index e8e0ef39..e8e0ef39 100644 --- a/lib/git/objects/__init__.py +++ b/objects/__init__.py diff --git a/lib/git/objects/base.py b/objects/base.py index b8cec47f..b8cec47f 100644 --- a/lib/git/objects/base.py +++ b/objects/base.py diff --git a/lib/git/objects/blob.py b/objects/blob.py index 32f8c61c..32f8c61c 100644 --- a/lib/git/objects/blob.py +++ b/objects/blob.py diff --git a/lib/git/objects/commit.py b/objects/commit.py index a2b6c554..a2b6c554 100644 --- a/lib/git/objects/commit.py +++ b/objects/commit.py diff --git a/lib/git/objects/fun.py b/objects/fun.py index 9b0a377c..9b0a377c 100644 --- a/lib/git/objects/fun.py +++ b/objects/fun.py diff --git a/lib/git/objects/submodule/__init__.py b/objects/submodule/__init__.py index 82df59b0..82df59b0 100644 --- a/lib/git/objects/submodule/__init__.py +++ b/objects/submodule/__init__.py diff --git a/lib/git/objects/submodule/base.py b/objects/submodule/base.py index 4f4223b6..4f4223b6 100644 --- a/lib/git/objects/submodule/base.py +++ b/objects/submodule/base.py diff --git a/lib/git/objects/submodule/root.py b/objects/submodule/root.py index 2e3cc775..2e3cc775 100644 --- a/lib/git/objects/submodule/root.py +++ b/objects/submodule/root.py diff --git a/lib/git/objects/submodule/util.py b/objects/submodule/util.py index 9b32807a..9b32807a 100644 --- a/lib/git/objects/submodule/util.py +++ b/objects/submodule/util.py diff --git a/lib/git/objects/tag.py b/objects/tag.py index c7d02abe..c7d02abe 100644 --- a/lib/git/objects/tag.py +++ b/objects/tag.py diff --git a/lib/git/objects/tree.py b/objects/tree.py index 67431686..67431686 100644 --- a/lib/git/objects/tree.py +++ b/objects/tree.py diff --git a/lib/git/objects/util.py b/objects/util.py index a9e1143c..a9e1143c 100644 --- a/lib/git/objects/util.py +++ b/objects/util.py diff --git a/lib/git/odict.py b/odict.py index 2c8391d7..2c8391d7 100644 --- a/lib/git/odict.py +++ b/odict.py diff --git a/lib/git/refs.py b/refs.py index 451cc3a5..451cc3a5 100644 --- a/lib/git/refs.py +++ b/refs.py diff --git a/lib/git/remote.py b/remote.py index 3edde175..3edde175 100644 --- a/lib/git/remote.py +++ b/remote.py diff --git a/lib/git/repo/__init__.py b/repo/__init__.py index 8902a254..8902a254 100644 --- a/lib/git/repo/__init__.py +++ b/repo/__init__.py diff --git a/lib/git/repo/base.py b/repo/base.py index 6f401628..6f401628 100644 --- a/lib/git/repo/base.py +++ b/repo/base.py diff --git a/lib/git/repo/fun.py b/repo/fun.py index a0f66fe5..a0f66fe5 100644 --- a/lib/git/repo/fun.py +++ b/repo/fun.py @@ -1,10 +1,10 @@ #!/usr/bin/env python try: - from setuptools import setup, find_packages + from setuptools import setup, find_packages except ImportError: - from ez_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages + from ez_setup import use_setuptools + use_setuptools() + from setuptools import setup, find_packages from distutils.command.build_py import build_py as _build_py from setuptools.command.sdist import sdist as _sdist @@ -15,65 +15,72 @@ v = open(path.join(path.dirname(__file__), 'VERSION')) VERSION = v.readline().strip() v.close() + class build_py(_build_py): - def run(self): - init = path.join(self.build_lib, 'git', '__init__.py') - if path.exists(init): - os.unlink(init) - _build_py.run(self) - _stamp_version(init) - self.byte_compile([init]) + def run(self): + init = path.join(self.build_lib, 'git', '__init__.py') + if path.exists(init): + os.unlink(init) + _build_py.run(self) + _stamp_version(init) + self.byte_compile([init]) + class sdist(_sdist): - def make_release_tree (self, base_dir, files): - _sdist.make_release_tree(self, base_dir, files) - orig = path.join('lib', 'git', '__init__.py') - assert path.exists(orig) - dest = path.join(base_dir, orig) - if hasattr(os, 'link') and path.exists(dest): - os.unlink(dest) - self.copy_file(orig, dest) - _stamp_version(dest) + def make_release_tree (self, base_dir, files): + _sdist.make_release_tree(self, base_dir, files) + orig = '__init__.py' + assert path.exists(orig) + dest = path.join(base_dir, orig) + if hasattr(os, 'link') and path.exists(dest): + os.unlink(dest) + self.copy_file(orig, dest) + _stamp_version(dest) + def _stamp_version(filename): - found, out = False, [] - f = open(filename, 'r') - for line in f: - if '__version__ =' in line: - line = line.replace("'git'", "'%s'" % VERSION) - found = True - out.append(line) - f.close() + found, out = False, [] + f = open(filename, 'r') + for line in f: + if '__version__ =' in line: + line = line.replace("'git'", "'%s'" % VERSION) + found = True + out.append(line) + f.close() - if found: - f = open(filename, 'w') - f.writelines(out) - f.close() + if found: + f = open(filename, 'w') + f.writelines(out) + f.close() + else: + print >> sys.stderr, "WARNING: Couldn't find version line in file %s" % filename setup(name = "GitPython", - cmdclass={'build_py': build_py, 'sdist': sdist}, - version = VERSION, - description = "Python Git Library", - author = "Sebastian Thiel, Michael Trier", - author_email = "byronimo@gmail.com, mtrier@gmail.com", - url = "http://gitorious.org/projects/git-python/", - packages = find_packages('lib'), - package_dir = {'':'lib'}, - license = "BSD License", - requires=('gitdb (>=0.5.1)',), - install_requires='gitdb >= 0.5.1', - zip_safe=False, - long_description = """\ + cmdclass={'build_py': build_py, 'sdist': sdist}, + version = VERSION, + description = "Python Git Library", + author = "Sebastian Thiel, Michael Trier", + author_email = "byronimo@gmail.com, mtrier@gmail.com", + url = "http://gitorious.org/projects/git-python/", + packages = ['git.'+p for p in find_packages('.')], + py_modules = ['git.'+f[:-3] for f in os.listdir('.') if f.endswith('.py')], + package_data = {'git.test' : ['fixtures/*']}, + package_dir = {'git':''}, + license = "BSD License", + requires=('gitdb (>=0.5.1)',), + install_requires='gitdb >= 0.5.1', + zip_safe=False, + long_description = """\ GitPython is a python library used to interact with Git repositories""", - classifiers = [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Topic :: Software Development :: Libraries :: Python Modules", - ] - ) + classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Topic :: Software Development :: Libraries :: Python Modules", + ] + ) diff --git a/test/git/__init__.py b/test/git/__init__.py deleted file mode 100644 index 757cbad1..00000000 --- a/test/git/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# __init__.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 diff --git a/test/testlib/__init__.py b/test/lib/__init__.py index 77512794..77512794 100644 --- a/test/testlib/__init__.py +++ b/test/lib/__init__.py diff --git a/test/testlib/asserts.py b/test/lib/asserts.py index fa754b92..fa754b92 100644 --- a/test/testlib/asserts.py +++ b/test/lib/asserts.py diff --git a/test/testlib/helper.py b/test/lib/helper.py index 4e7b5cf6..4e7b5cf6 100644 --- a/test/testlib/helper.py +++ b/test/lib/helper.py diff --git a/test/git/performance/lib.py b/test/performance/lib.py index 4ac1f1da..d0727b60 100644 --- a/test/git/performance/lib.py +++ b/test/performance/lib.py @@ -1,6 +1,6 @@ """Contains library functions""" import os -from test.testlib import * +from git.test.lib import * import shutil import tempfile diff --git a/test/git/performance/test_commit.py b/test/performance/test_commit.py index 62d409fc..80421aa2 100644 --- a/test/git/performance/test_commit.py +++ b/test/performance/test_commit.py @@ -7,7 +7,7 @@ from lib import * from git import * from gitdb import IStream -from test.git.test_commit import assert_commit_serialization +from git.test.test_commit import assert_commit_serialization from cStringIO import StringIO from time import time import sys diff --git a/test/git/performance/test_odb.py b/test/performance/test_odb.py index 32b70f69..32b70f69 100644 --- a/test/git/performance/test_odb.py +++ b/test/performance/test_odb.py diff --git a/test/git/performance/test_streams.py b/test/performance/test_streams.py index a5811262..7f17d722 100644 --- a/test/git/performance/test_streams.py +++ b/test/performance/test_streams.py @@ -1,6 +1,6 @@ """Performance data streaming performance""" -from test.testlib import * +from git.test.lib import * from gitdb import * from gitdb.util import bin_to_hex diff --git a/test/git/performance/test_utils.py b/test/performance/test_utils.py index 19c1e84a..19c1e84a 100644 --- a/test/git/performance/test_utils.py +++ b/test/performance/test_utils.py diff --git a/test/git/test_actor.py b/test/test_actor.py index 8fda57e5..b8e5ba3b 100644 --- a/test/git/test_actor.py +++ b/test/test_actor.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from test.testlib import * +from git.test.lib import * from git import * class TestActor(object): diff --git a/test/git/test_base.py b/test/test_base.py index 25d1e4e9..e630d151 100644 --- a/test/git/test_base.py +++ b/test/test_base.py @@ -8,7 +8,7 @@ import git.objects.base as base import git.refs as refs import os -from test.testlib import * +from git.test.lib import * from git import * from itertools import chain from git.objects.util import get_object_type_by_name diff --git a/test/git/test_blob.py b/test/test_blob.py index 623ed179..8513328e 100644 --- a/test/git/test_blob.py +++ b/test/test_blob.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from gitdb.util import hex_to_bin diff --git a/test/git/test_commit.py b/test/test_commit.py index c3ce5c92..a00a8de8 100644 --- a/test/git/test_commit.py +++ b/test/test_commit.py @@ -5,7 +5,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from gitdb import IStream from gitdb.util import hex_to_bin diff --git a/test/git/test_config.py b/test/test_config.py index 8c846b99..173e380c 100644 --- a/test/git/test_config.py +++ b/test/test_config.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * import StringIO from copy import copy diff --git a/test/git/test_db.py b/test/test_db.py index 9da13bd8..db2d7983 100644 --- a/test/git/test_db.py +++ b/test/test_db.py @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git.db import * from gitdb.util import bin_to_hex from git.exc import BadObject diff --git a/test/git/test_diff.py b/test/test_diff.py index ade21c1b..83db2df6 100644 --- a/test/git/test_diff.py +++ b/test/test_diff.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * class TestDiff(TestBase): diff --git a/test/git/test_fun.py b/test/test_fun.py index 3fdc13fd..b7991cdb 100644 --- a/test/git/test_fun.py +++ b/test/test_fun.py @@ -1,4 +1,4 @@ -from test.testlib import * +from git.test.lib import * from git.objects.fun import ( traverse_tree_recursive, traverse_trees_recursive, diff --git a/test/git/test_git.py b/test/test_git.py index 518c464a..c92a642b 100644 --- a/test/git/test_git.py +++ b/test/test_git.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os, sys -from test.testlib import * +from git.test.lib import * from git import Git, GitCommandError class TestGit(TestCase): diff --git a/test/git/test_index.py b/test/test_index.py index 29a7404d..78a868c7 100644 --- a/test/git/test_index.py +++ b/test/test_index.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * import inspect import os diff --git a/test/git/test_refs.py b/test/test_refs.py index fa26bae9..700e5fac 100644 --- a/test/git/test_refs.py +++ b/test/test_refs.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from mock import * -from test.testlib import * +from git.test.lib import * from git import * import git.refs as refs from git.objects.tag import TagObject diff --git a/test/git/test_remote.py b/test/test_remote.py index c52f907e..108712a5 100644 --- a/test/git/test_remote.py +++ b/test/test_remote.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from git.util import IterableList import tempfile diff --git a/test/git/test_repo.py b/test/test_repo.py index 62b4c476..59a1f6bf 100644 --- a/test/git/test_repo.py +++ b/test/test_repo.py @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from git.util import join_path_native from git.exc import BadObject diff --git a/test/git/test_stats.py b/test/test_stats.py index cc30bf92..2bdb0a89 100644 --- a/test/git/test_stats.py +++ b/test/test_stats.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * class TestStats(TestBase): diff --git a/test/git/test_submodule.py b/test/test_submodule.py index d922f32a..c1fa2061 100644 --- a/test/git/test_submodule.py +++ b/test/test_submodule.py @@ -1,7 +1,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git.exc import * from git.objects.submodule.base import Submodule from git.objects.submodule.root import RootModule @@ -12,7 +12,7 @@ import os class TestSubmodule(TestBase): - k_subm_current = "45c0f285a6d9d9214f8167742d12af2855f527fb" + k_subm_current = "83a9e4a0dad595188ff3fb35bc3dfc4d931eff6d" k_subm_changed = "394ed7006ee5dc8bddfd132b64001d5dfc0ffdd3" k_no_subm_tag = "0.1.6" @@ -32,7 +32,7 @@ class TestSubmodule(TestBase): # at a different time, there is None assert len(Submodule.list_items(rwrepo, self.k_no_subm_tag)) == 0 - assert sm.path == 'lib/git/ext/gitdb' + assert sm.path == 'ext/gitdb' assert sm.path != sm.name # in our case, we have ids there, which don't equal the path assert sm.url == 'git://gitorious.org/git-python/gitdb.git' assert sm.branch_path == 'refs/heads/master' # the default ... @@ -298,10 +298,6 @@ class TestSubmodule(TestBase): assert nsm.path == nmp assert rwrepo.submodules[0].path == nmp - # move it back - but there is a file now - this doesn't work - # as the empty directories where removed. - self.failUnlessRaises(IOError, open, abspmp, 'w') - mpath = 'newsubmodule' absmpath = join_path_native(rwrepo.working_tree_dir, mpath) open(absmpath, 'w').write('') diff --git a/test/git/test_tree.py b/test/test_tree.py index 18688424..80db2e4b 100644 --- a/test/git/test_tree.py +++ b/test/test_tree.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from test.testlib import * +from git.test.lib import * from git import * from git.objects.fun import ( traverse_tree_recursive, diff --git a/test/git/test_util.py b/test/test_util.py index 6453bc19..7a6eb27d 100644 --- a/test/git/test_util.py +++ b/test/test_util.py @@ -7,7 +7,7 @@ import os import tempfile -from test.testlib import * +from git.test.lib import * from git.util import * from git.objects.util import * from git import * diff --git a/lib/git/util.py b/util.py index c945e6a3..c945e6a3 100644 --- a/lib/git/util.py +++ b/util.py |