Skip to content

Commit f8ce24a

Browse files
committed
-#######->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 one level up into the 'git' subdirectory, which means that the 'git-python' directory now contains the 'git' root package. To allow git to be found, add ./git-python into your path. To finalize your update, run the following commands git submodule update --init --recursive As there will be left-over directories, consider running git-clean
2 parents 65747a2 + 9004e3a commit f8ce24a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+34
-245
lines changed

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "gitdb"]
2-
path = ext/gitdb
3-
url = git://gitorious.org/git-python/gitdb.git
2+
path = git/ext/gitdb
3+
url = git://github.com/Byron/gitdb.git

CHANGES

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
Please see the online documentation for the latest changelog:
2-
http://packages.python.org/GitPython/0.3/changes.html
3-
4-
To see the changes of this very version, have a look at the file:
5-
doc/source/changes.rst
2+
http://packages.python.org/GitPython/

MANIFEST.in

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ include CHANGES
44
include AUTHORS
55
include README
66

7-
graft test/fixtures
7+
graft git/test/fixtures
8+
graft git/test/performance
9+

README

+11-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
GitPython
33
==========
44

5-
GitPython is a python library used to interact with Git repositories.
5+
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
66

7-
GitPython is a port of the grit library in Ruby created by
8-
Tom Preston-Werner and Chris Wanstrath.
7+
It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git repository more directly using either a pure python implementation, or the faster, but more resource intensive git command implementation.
98

9+
The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming.
1010

1111
REQUIREMENTS
1212
============
1313

14-
* Git ( tested with 1.5.3.7 )
14+
* Git ( tested with 1.7.3.2 )
1515
* Python Nose - used for running the tests
1616
* Mock by Michael Foord used for tests. Requires 0.5
1717

@@ -32,17 +32,21 @@ A distribution package can be obtained for manual installation at:
3232
SOURCE
3333
======
3434

35-
GitPython's git repo is available on Gitorious and GitHub, which can be browsed at:
35+
GitPython's git repo is available on GitHub, which can be browsed at:
3636

37-
http://gitorious.org/projects/git-python/
3837
http://github.com/Byron/GitPython
3938

4039
and cloned using:
4140

42-
git clone git://gitorious.org/git-python/mainline.git git-python
4341
git clone git://github.com/Byron/GitPython.git git-python
4442

4543

44+
DOCUMENTATION
45+
=============
46+
The html-compiled documentation can be found at the following URL:
47+
48+
http://packages.python.org/GitPython/
49+
4650
MAILING LIST
4751
============
4852
http://groups.google.com/group/git-python

doc/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
# is relative to the documentation root, use os.path.abspath to make it
2121
# absolute, like shown here.
2222
#sys.path.append(os.path.abspath('.'))
23-
sys.path.insert(0, os.path.abspath('../../../'))
23+
sys.path.insert(0, os.path.abspath('../..'))
24+
print sys.path
2425

2526
# General configuration
2627
# ---------------------

ext/gitdb

-1
This file was deleted.

ez_setup.py

-222
This file was deleted.
File renamed without changes.

cmd.py renamed to git/cmd.py

File renamed without changes.

config.py renamed to git/config.py

File renamed without changes.

db.py renamed to git/db.py

File renamed without changes.

diff.py renamed to git/diff.py

File renamed without changes.

exc.py renamed to git/exc.py

File renamed without changes.

git/ext/gitdb

Submodule gitdb added at 9f977b8
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

odict.py renamed to git/odict.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

remote.py renamed to git/remote.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/lib/helper.py renamed to git/test/lib/helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import shutil
1313
import cStringIO
1414

15-
GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
15+
GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
1616

1717
__all__ = (
1818
'fixture_path', 'fixture', 'absolute_project_path', 'StringProcessAdapter',
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/test_submodule.py renamed to git/test/test_submodule.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def update(self, op, index, max_count, message=''):
2020

2121
class TestSubmodule(TestBase):
2222

23-
k_subm_current = "83a9e4a0dad595188ff3fb35bc3dfc4d931eff6d"
23+
k_subm_current = "cb68eef0865df6aedbc11cd81888625a70da6777"
2424
k_subm_changed = "394ed7006ee5dc8bddfd132b64001d5dfc0ffdd3"
2525
k_no_subm_tag = "0.1.6"
2626

@@ -40,7 +40,7 @@ def _do_base_tests(self, rwrepo):
4040
# at a different time, there is None
4141
assert len(Submodule.list_items(rwrepo, self.k_no_subm_tag)) == 0
4242

43-
assert sm.path == 'ext/gitdb'
43+
assert sm.path == 'git/ext/gitdb'
4444
assert sm.path != sm.name # in our case, we have ids there, which don't equal the path
4545
assert sm.url == 'git://gitorious.org/git-python/gitdb.git'
4646
assert sm.branch_path == 'refs/heads/master' # the default ...
@@ -184,7 +184,7 @@ def _do_base_tests(self, rwrepo):
184184
sm.update(recursive=True, dry_run=True, progress=prog)
185185
assert not csm.module_exists()
186186

187-
# update recuesively again
187+
# update recursively again
188188
sm.update(recursive=True)
189189
assert csm.module_exists()
190190

@@ -237,6 +237,7 @@ def _do_base_tests(self, rwrepo):
237237
# deletion will fail
238238
# NOTE: As we did a few updates in the meanwhile, the indices were reset
239239
# Hence we create some changes
240+
csm.set_parent_commit(csm.repo.head.commit)
240241
sm.config_writer().set_value("somekey", "somevalue")
241242
csm.config_writer().set_value("okey", "ovalue")
242243
self.failUnlessRaises(InvalidGitRepositoryError, sm.remove)
File renamed without changes.
File renamed without changes.

util.py renamed to git/util.py

File renamed without changes.

setup.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from distutils.command.build_py import build_py as _build_py
1010
from setuptools.command.sdist import sdist as _sdist
1111
import os
12+
import sys
1213
from os import path
1314

1415
v = open(path.join(path.dirname(__file__), 'VERSION'))
@@ -29,8 +30,8 @@ def run(self):
2930
class sdist(_sdist):
3031
def make_release_tree (self, base_dir, files):
3132
_sdist.make_release_tree(self, base_dir, files)
32-
orig = '__init__.py'
33-
assert path.exists(orig)
33+
orig = path.join('git', '__init__.py')
34+
assert path.exists(orig), orig
3435
dest = path.join(base_dir, orig)
3536
if hasattr(os, 'link') and path.exists(dest):
3637
os.unlink(dest)
@@ -40,7 +41,12 @@ def make_release_tree (self, base_dir, files):
4041

4142
def _stamp_version(filename):
4243
found, out = False, []
43-
f = open(filename, 'r')
44+
try:
45+
f = open(filename, 'r')
46+
except (IOError, OSError):
47+
print >> sys.stderr, "Couldn't find file %s to stamp version" % filename
48+
return
49+
#END handle error, usually happens during binary builds
4450
for line in f:
4551
if '__version__ =' in line:
4652
line = line.replace("'git'", "'%s'" % VERSION)

0 commit comments

Comments
 (0)