summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-25 18:10:33 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-25 18:18:15 +0100
commitf8ce24a835cae8c623e2936bec2618a8855c605b (patch)
treed4c1d392579e24285381613a4ac1b7cc2d6b6fae
parent65747a216c67c3101c6ae2edaa8119d786b793cb (diff)
parent9004e3a1cf33110f2cbc458f1dc3259c930ad9b4 (diff)
downloadgitpython-f8ce24a835cae8c623e2936bec2618a8855c605b.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 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
-rw-r--r--.gitmodules4
-rw-r--r--CHANGES5
-rw-r--r--MANIFEST.in4
-rw-r--r--README18
-rw-r--r--doc/source/conf.py3
m---------ext/gitdb0
-rw-r--r--ez_setup.py222
-rw-r--r--git/__init__.py (renamed from __init__.py)0
-rw-r--r--git/cmd.py (renamed from cmd.py)0
-rw-r--r--git/config.py (renamed from config.py)0
-rw-r--r--git/db.py (renamed from db.py)0
-rw-r--r--git/diff.py (renamed from diff.py)0
-rw-r--r--git/exc.py (renamed from exc.py)0
m---------git/ext/gitdb0
-rw-r--r--git/index/__init__.py (renamed from index/__init__.py)0
-rw-r--r--git/index/base.py (renamed from index/base.py)0
-rw-r--r--git/index/fun.py (renamed from index/fun.py)0
-rw-r--r--git/index/typ.py (renamed from index/typ.py)0
-rw-r--r--git/index/util.py (renamed from index/util.py)0
-rw-r--r--git/objects/__init__.py (renamed from objects/__init__.py)0
-rw-r--r--git/objects/base.py (renamed from objects/base.py)0
-rw-r--r--git/objects/blob.py (renamed from objects/blob.py)0
-rw-r--r--git/objects/commit.py (renamed from objects/commit.py)0
-rw-r--r--git/objects/fun.py (renamed from objects/fun.py)0
-rw-r--r--git/objects/submodule/__init__.py (renamed from objects/submodule/__init__.py)0
-rw-r--r--git/objects/submodule/base.py (renamed from objects/submodule/base.py)0
-rw-r--r--git/objects/submodule/root.py (renamed from objects/submodule/root.py)0
-rw-r--r--git/objects/submodule/util.py (renamed from objects/submodule/util.py)0
-rw-r--r--git/objects/tag.py (renamed from objects/tag.py)0
-rw-r--r--git/objects/tree.py (renamed from objects/tree.py)0
-rw-r--r--git/objects/util.py (renamed from objects/util.py)0
-rw-r--r--git/odict.py (renamed from odict.py)0
-rw-r--r--git/refs/__init__.py (renamed from refs/__init__.py)0
-rw-r--r--git/refs/head.py (renamed from refs/head.py)0
-rw-r--r--git/refs/log.py (renamed from refs/log.py)0
-rw-r--r--git/refs/reference.py (renamed from refs/reference.py)0
-rw-r--r--git/refs/remote.py (renamed from refs/remote.py)0
-rw-r--r--git/refs/symbolic.py (renamed from refs/symbolic.py)0
-rw-r--r--git/refs/tag.py (renamed from refs/tag.py)0
-rw-r--r--git/remote.py (renamed from remote.py)0
-rw-r--r--git/repo/__init__.py (renamed from repo/__init__.py)0
-rw-r--r--git/repo/base.py (renamed from repo/base.py)0
-rw-r--r--git/repo/fun.py (renamed from repo/fun.py)0
-rw-r--r--git/test/__init__.py (renamed from test/__init__.py)0
-rw-r--r--git/test/fixtures/blame (renamed from test/fixtures/blame)0
-rw-r--r--git/test/fixtures/cat_file_blob (renamed from test/fixtures/cat_file_blob)0
-rw-r--r--git/test/fixtures/cat_file_blob_nl (renamed from test/fixtures/cat_file_blob_nl)0
-rw-r--r--git/test/fixtures/cat_file_blob_size (renamed from test/fixtures/cat_file_blob_size)0
-rw-r--r--git/test/fixtures/diff_2 (renamed from test/fixtures/diff_2)0
-rw-r--r--git/test/fixtures/diff_2f (renamed from test/fixtures/diff_2f)0
-rw-r--r--git/test/fixtures/diff_f (renamed from test/fixtures/diff_f)0
-rw-r--r--git/test/fixtures/diff_i (renamed from test/fixtures/diff_i)0
-rwxr-xr-xgit/test/fixtures/diff_mode_only (renamed from test/fixtures/diff_mode_only)0
-rw-r--r--git/test/fixtures/diff_new_mode (renamed from test/fixtures/diff_new_mode)0
-rw-r--r--git/test/fixtures/diff_numstat (renamed from test/fixtures/diff_numstat)0
-rw-r--r--git/test/fixtures/diff_p (renamed from test/fixtures/diff_p)0
-rw-r--r--git/test/fixtures/diff_rename (renamed from test/fixtures/diff_rename)0
-rw-r--r--git/test/fixtures/diff_tree_numstat_root (renamed from test/fixtures/diff_tree_numstat_root)0
-rw-r--r--git/test/fixtures/for_each_ref_with_path_component (renamed from test/fixtures/for_each_ref_with_path_component)bin84 -> 84 bytes
-rw-r--r--git/test/fixtures/git_config (renamed from test/fixtures/git_config)0
-rw-r--r--git/test/fixtures/git_config_global (renamed from test/fixtures/git_config_global)0
-rw-r--r--git/test/fixtures/index (renamed from test/fixtures/index)bin163616 -> 163616 bytes
-rw-r--r--git/test/fixtures/index_merge (renamed from test/fixtures/index_merge)bin9192 -> 9192 bytes
-rw-r--r--git/test/fixtures/ls_tree_a (renamed from test/fixtures/ls_tree_a)0
-rw-r--r--git/test/fixtures/ls_tree_b (renamed from test/fixtures/ls_tree_b)0
-rw-r--r--git/test/fixtures/ls_tree_commit (renamed from test/fixtures/ls_tree_commit)0
-rw-r--r--git/test/fixtures/reflog_HEAD (renamed from test/fixtures/reflog_HEAD)0
-rw-r--r--git/test/fixtures/reflog_invalid_date (renamed from test/fixtures/reflog_invalid_date)0
-rw-r--r--git/test/fixtures/reflog_invalid_email (renamed from test/fixtures/reflog_invalid_email)0
-rw-r--r--git/test/fixtures/reflog_invalid_newsha (renamed from test/fixtures/reflog_invalid_newsha)0
-rw-r--r--git/test/fixtures/reflog_invalid_oldsha (renamed from test/fixtures/reflog_invalid_oldsha)0
-rw-r--r--git/test/fixtures/reflog_invalid_sep (renamed from test/fixtures/reflog_invalid_sep)0
-rw-r--r--git/test/fixtures/reflog_master (renamed from test/fixtures/reflog_master)0
-rw-r--r--git/test/fixtures/rev_list (renamed from test/fixtures/rev_list)0
-rw-r--r--git/test/fixtures/rev_list_bisect_all (renamed from test/fixtures/rev_list_bisect_all)0
-rw-r--r--git/test/fixtures/rev_list_commit_diffs (renamed from test/fixtures/rev_list_commit_diffs)0
-rw-r--r--git/test/fixtures/rev_list_commit_idabbrev (renamed from test/fixtures/rev_list_commit_idabbrev)0
-rw-r--r--git/test/fixtures/rev_list_commit_stats (renamed from test/fixtures/rev_list_commit_stats)0
-rw-r--r--git/test/fixtures/rev_list_count (renamed from test/fixtures/rev_list_count)0
-rw-r--r--git/test/fixtures/rev_list_delta_a (renamed from test/fixtures/rev_list_delta_a)0
-rw-r--r--git/test/fixtures/rev_list_delta_b (renamed from test/fixtures/rev_list_delta_b)0
-rw-r--r--git/test/fixtures/rev_list_single (renamed from test/fixtures/rev_list_single)0
-rw-r--r--git/test/fixtures/rev_parse (renamed from test/fixtures/rev_parse)0
-rw-r--r--git/test/fixtures/show_empty_commit (renamed from test/fixtures/show_empty_commit)0
-rw-r--r--git/test/lib/__init__.py (renamed from test/lib/__init__.py)0
-rw-r--r--git/test/lib/asserts.py (renamed from test/lib/asserts.py)0
-rw-r--r--git/test/lib/helper.py (renamed from test/lib/helper.py)2
-rw-r--r--git/test/performance/lib.py (renamed from test/performance/lib.py)0
-rw-r--r--git/test/performance/test_commit.py (renamed from test/performance/test_commit.py)0
-rw-r--r--git/test/performance/test_odb.py (renamed from test/performance/test_odb.py)0
-rw-r--r--git/test/performance/test_streams.py (renamed from test/performance/test_streams.py)0
-rw-r--r--git/test/performance/test_utils.py (renamed from test/performance/test_utils.py)0
-rw-r--r--git/test/test_actor.py (renamed from test/test_actor.py)0
-rw-r--r--git/test/test_base.py (renamed from test/test_base.py)0
-rw-r--r--git/test/test_blob.py (renamed from test/test_blob.py)0
-rw-r--r--git/test/test_commit.py (renamed from test/test_commit.py)0
-rw-r--r--git/test/test_config.py (renamed from test/test_config.py)0
-rw-r--r--git/test/test_db.py (renamed from test/test_db.py)0
-rw-r--r--git/test/test_diff.py (renamed from test/test_diff.py)0
-rw-r--r--git/test/test_fun.py (renamed from test/test_fun.py)0
-rw-r--r--git/test/test_git.py (renamed from test/test_git.py)0
-rw-r--r--git/test/test_index.py (renamed from test/test_index.py)0
-rw-r--r--git/test/test_reflog.py (renamed from test/test_reflog.py)0
-rw-r--r--git/test/test_refs.py (renamed from test/test_refs.py)0
-rw-r--r--git/test/test_remote.py (renamed from test/test_remote.py)0
-rw-r--r--git/test/test_repo.py (renamed from test/test_repo.py)0
-rw-r--r--git/test/test_stats.py (renamed from test/test_stats.py)0
-rw-r--r--git/test/test_submodule.py (renamed from test/test_submodule.py)7
-rw-r--r--git/test/test_tree.py (renamed from test/test_tree.py)0
-rw-r--r--git/test/test_util.py (renamed from test/test_util.py)0
-rw-r--r--git/util.py (renamed from util.py)0
-rwxr-xr-xsetup.py12
112 files changed, 33 insertions, 244 deletions
diff --git a/.gitmodules b/.gitmodules
index 70a60616..271899fc 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "gitdb"]
- path = ext/gitdb
- url = git://gitorious.org/git-python/gitdb.git
+ path = git/ext/gitdb
+ url = git://github.com/Byron/gitdb.git
diff --git a/CHANGES b/CHANGES
index cc910888..65a80c1e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,2 @@
Please see the online documentation for the latest changelog:
-http://packages.python.org/GitPython/0.3/changes.html
-
-To see the changes of this very version, have a look at the file:
-doc/source/changes.rst
+http://packages.python.org/GitPython/
diff --git a/MANIFEST.in b/MANIFEST.in
index 8917827d..89f5b92d 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,4 +4,6 @@ include CHANGES
include AUTHORS
include README
-graft test/fixtures
+graft git/test/fixtures
+graft git/test/performance
+
diff --git a/README b/README
index 531ea8f9..e0f2947d 100644
--- a/README
+++ b/README
@@ -2,16 +2,16 @@
GitPython
==========
-GitPython is a python library used to interact with Git repositories.
+GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
-GitPython is a port of the grit library in Ruby created by
-Tom Preston-Werner and Chris Wanstrath.
+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.
+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.
REQUIREMENTS
============
-* Git ( tested with 1.5.3.7 )
+* Git ( tested with 1.7.3.2 )
* Python Nose - used for running the tests
* Mock by Michael Foord used for tests. Requires 0.5
@@ -32,17 +32,21 @@ A distribution package can be obtained for manual installation at:
SOURCE
======
-GitPython's git repo is available on Gitorious and GitHub, which can be browsed at:
+GitPython's git repo is available on GitHub, which can be browsed at:
-http://gitorious.org/projects/git-python/
http://github.com/Byron/GitPython
and cloned using:
-git clone git://gitorious.org/git-python/mainline.git git-python
git clone git://github.com/Byron/GitPython.git git-python
+DOCUMENTATION
+=============
+The html-compiled documentation can be found at the following URL:
+
+http://packages.python.org/GitPython/
+
MAILING LIST
============
http://groups.google.com/group/git-python
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 469ab3b3..2da09c66 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -20,7 +20,8 @@ import sys, os
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
-sys.path.insert(0, os.path.abspath('../../../'))
+sys.path.insert(0, os.path.abspath('../..'))
+print sys.path
# General configuration
# ---------------------
diff --git a/ext/gitdb b/ext/gitdb
deleted file mode 160000
-Subproject 1bc281d31b8d31fd4dcbcd9b441b5c7b2c1b0bb
diff --git a/ez_setup.py b/ez_setup.py
deleted file mode 100644
index 3031ad0d..00000000
--- a/ez_setup.py
+++ /dev/null
@@ -1,222 +0,0 @@
-#!python
-"""Bootstrap setuptools installation
-
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
-
- from ez_setup import use_setuptools
- use_setuptools()
-
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
-the appropriate options to ``use_setuptools()``.
-
-This file can also be run as a script to install or upgrade setuptools.
-"""
-import sys
-DEFAULT_VERSION = "0.6c3"
-DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3]
-
-md5_data = {
- 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
- 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
- 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
- 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
- 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
- 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
- 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
- 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
- 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
- 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
- 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
- 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
- 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
- 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
- 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
-}
-
-import sys, os
-
-def _validate_md5(egg_name, data):
- if egg_name in md5_data:
- from md5 import md5
- digest = md5(data).hexdigest()
- if digest != md5_data[egg_name]:
- print >>sys.stderr, (
- "md5 validation of %s failed! (Possible download problem?)"
- % egg_name
- )
- sys.exit(2)
- return data
-
-
-def use_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- download_delay=15
-):
- """Automatically find/download setuptools and make it available on sys.path
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end with
- a '/'). `to_dir` is the directory where setuptools will be downloaded, if
- it is not already available. If `download_delay` is specified, it should
- be the number of seconds that will be paused before initiating a download,
- should one be required. If an older version of setuptools is installed,
- this routine will print a message to ``sys.stderr`` and raise SystemExit in
- an attempt to abort the calling script.
- """
- try:
- import setuptools
- if setuptools.__version__ == '0.0.1':
- print >>sys.stderr, (
- "You have an obsolete version of setuptools installed. Please\n"
- "remove it from your system entirely before rerunning this script."
- )
- sys.exit(2)
- except ImportError:
- egg = download_setuptools(version, download_base, to_dir, download_delay)
- sys.path.insert(0, egg)
- import setuptools; setuptools.bootstrap_install_from = egg
-
- import pkg_resources
- try:
- pkg_resources.require("setuptools>="+version)
-
- except pkg_resources.VersionConflict, e:
- # XXX could we install in a subprocess here?
- print >>sys.stderr, (
- "The required version of setuptools (>=%s) is not available, and\n"
- "can't be installed while this script is running. Please install\n"
- " a more recent version first.\n\n(Currently using %r)"
- ) % (version, e.args[0])
- sys.exit(2)
-
-def download_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- delay = 15
-):
- """Download setuptools from a specified location and return its filename
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end
- with a '/'). `to_dir` is the directory where the egg will be downloaded.
- `delay` is the number of seconds to pause before an actual download attempt.
- """
- import urllib2, shutil
- egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
- url = download_base + egg_name
- saveto = os.path.join(to_dir, egg_name)
- src = dst = None
- if not os.path.exists(saveto): # Avoid repeated downloads
- try:
- from distutils import log
- if delay:
- log.warn("""
----------------------------------------------------------------------------
-This script requires setuptools version %s to run (even to display
-help). I will attempt to download it for you (from
-%s), but
-you may need to enable firewall access for this script first.
-I will start the download in %d seconds.
-
-(Note: if this machine does not have network access, please obtain the file
-
- %s
-
-and place it in this directory before rerunning this script.)
----------------------------------------------------------------------------""",
- version, download_base, delay, url
- ); from time import sleep; sleep(delay)
- log.warn("Downloading %s", url)
- src = urllib2.urlopen(url)
- # Read/write all in one block, so we don't create a corrupt file
- # if the download is interrupted.
- data = _validate_md5(egg_name, src.read())
- dst = open(saveto,"wb"); dst.write(data)
- finally:
- if src: src.close()
- if dst: dst.close()
- return os.path.realpath(saveto)
-
-def main(argv, version=DEFAULT_VERSION):
- """Install or upgrade setuptools and EasyInstall"""
-
- try:
- import setuptools
- except ImportError:
- egg = None
- try:
- egg = download_setuptools(version, delay=0)
- sys.path.insert(0,egg)
- from setuptools.command.easy_install import main
- return main(list(argv)+[egg]) # we're done here
- finally:
- if egg and os.path.exists(egg):
- os.unlink(egg)
- else:
- if setuptools.__version__ == '0.0.1':
- # tell the user to uninstall obsolete version
- use_setuptools(version)
-
- req = "setuptools>="+version
- import pkg_resources
- try:
- pkg_resources.require(req)
- except pkg_resources.VersionConflict:
- try:
- from setuptools.command.easy_install import main
- except ImportError:
- from easy_install import main
- main(list(argv)+[download_setuptools(delay=0)])
- sys.exit(0) # try to force an exit
- else:
- if argv:
- from setuptools.command.easy_install import main
- main(argv)
- else:
- print "Setuptools version",version,"or greater has been installed."
- print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
-
-
-
-def update_md5(filenames):
- """Update our built-in md5 registry"""
-
- import re
- from md5 import md5
-
- for name in filenames:
- base = os.path.basename(name)
- f = open(name,'rb')
- md5_data[base] = md5(f.read()).hexdigest()
- f.close()
-
- data = [" %r: %r,\n" % it for it in md5_data.items()]
- data.sort()
- repl = "".join(data)
-
- import inspect
- srcfile = inspect.getsourcefile(sys.modules[__name__])
- f = open(srcfile, 'rb'); src = f.read(); f.close()
-
- match = re.search("\nmd5_data = {\n([^}]+)}", src)
- if not match:
- print >>sys.stderr, "Internal error!"
- sys.exit(2)
-
- src = src[:match.start(1)] + repl + src[match.end(1):]
- f = open(srcfile,'w')
- f.write(src)
- f.close()
-
-
-if __name__=='__main__':
- if len(sys.argv)>2 and sys.argv[1]=='--md5update':
- update_md5(sys.argv[2:])
- else:
- main(sys.argv[1:])
-
-
-
-
-
diff --git a/__init__.py b/git/__init__.py
index 483ac091..483ac091 100644
--- a/__init__.py
+++ b/git/__init__.py
diff --git a/cmd.py b/git/cmd.py
index 60887f5d..60887f5d 100644
--- a/cmd.py
+++ b/git/cmd.py
diff --git a/config.py b/git/config.py
index f1a8832e..f1a8832e 100644
--- a/config.py
+++ b/git/config.py
diff --git a/db.py b/git/db.py
index b1c65377..b1c65377 100644
--- a/db.py
+++ b/git/db.py
diff --git a/diff.py b/git/diff.py
index 48253c42..48253c42 100644
--- a/diff.py
+++ b/git/diff.py
diff --git a/exc.py b/git/exc.py
index d2cb8d7e..d2cb8d7e 100644
--- a/exc.py
+++ b/git/exc.py
diff --git a/git/ext/gitdb b/git/ext/gitdb
new file mode 160000
+Subproject 9f977b8baaf9cbe9b38f3bdf4887cef5370b222
diff --git a/index/__init__.py b/git/index/__init__.py
index fe4a7f59..fe4a7f59 100644
--- a/index/__init__.py
+++ b/git/index/__init__.py
diff --git a/index/base.py b/git/index/base.py
index d813e6c1..d813e6c1 100644
--- a/index/base.py
+++ b/git/index/base.py
diff --git a/index/fun.py b/git/index/fun.py
index 9b35bf04..9b35bf04 100644
--- a/index/fun.py
+++ b/git/index/fun.py
diff --git a/index/typ.py b/git/index/typ.py
index ad988285..ad988285 100644
--- a/index/typ.py
+++ b/git/index/typ.py
diff --git a/index/util.py b/git/index/util.py
index bd5fcc03..bd5fcc03 100644
--- a/index/util.py
+++ b/git/index/util.py
diff --git a/objects/__init__.py b/git/objects/__init__.py
index 77f69d29..77f69d29 100644
--- a/objects/__init__.py
+++ b/git/objects/__init__.py
diff --git a/objects/base.py b/git/objects/base.py
index 5f2f7809..5f2f7809 100644
--- a/objects/base.py
+++ b/git/objects/base.py
diff --git a/objects/blob.py b/git/objects/blob.py
index 32f8c61c..32f8c61c 100644
--- a/objects/blob.py
+++ b/git/objects/blob.py
diff --git a/objects/commit.py b/git/objects/commit.py
index 69a3adc4..69a3adc4 100644
--- a/objects/commit.py
+++ b/git/objects/commit.py
diff --git a/objects/fun.py b/git/objects/fun.py
index 9b0a377c..9b0a377c 100644
--- a/objects/fun.py
+++ b/git/objects/fun.py
diff --git a/objects/submodule/__init__.py b/git/objects/submodule/__init__.py
index 82df59b0..82df59b0 100644
--- a/objects/submodule/__init__.py
+++ b/git/objects/submodule/__init__.py
diff --git a/objects/submodule/base.py b/git/objects/submodule/base.py
index fd6c9396..fd6c9396 100644
--- a/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
diff --git a/objects/submodule/root.py b/git/objects/submodule/root.py
index 36cd7209..36cd7209 100644
--- a/objects/submodule/root.py
+++ b/git/objects/submodule/root.py
diff --git a/objects/submodule/util.py b/git/objects/submodule/util.py
index 9b32807a..9b32807a 100644
--- a/objects/submodule/util.py
+++ b/git/objects/submodule/util.py
diff --git a/objects/tag.py b/git/objects/tag.py
index c7d02abe..c7d02abe 100644
--- a/objects/tag.py
+++ b/git/objects/tag.py
diff --git a/objects/tree.py b/git/objects/tree.py
index 67431686..67431686 100644
--- a/objects/tree.py
+++ b/git/objects/tree.py
diff --git a/objects/util.py b/git/objects/util.py
index 4c9323b8..4c9323b8 100644
--- a/objects/util.py
+++ b/git/objects/util.py
diff --git a/odict.py b/git/odict.py
index 2c8391d7..2c8391d7 100644
--- a/odict.py
+++ b/git/odict.py
diff --git a/refs/__init__.py b/git/refs/__init__.py
index fc8ce644..fc8ce644 100644
--- a/refs/__init__.py
+++ b/git/refs/__init__.py
diff --git a/refs/head.py b/git/refs/head.py
index d8729434..d8729434 100644
--- a/refs/head.py
+++ b/git/refs/head.py
diff --git a/refs/log.py b/git/refs/log.py
index f49c07fd..f49c07fd 100644
--- a/refs/log.py
+++ b/git/refs/log.py
diff --git a/refs/reference.py b/git/refs/reference.py
index 1a745ee9..1a745ee9 100644
--- a/refs/reference.py
+++ b/git/refs/reference.py
diff --git a/refs/remote.py b/git/refs/remote.py
index b7b07d4b..b7b07d4b 100644
--- a/refs/remote.py
+++ b/git/refs/remote.py
diff --git a/refs/symbolic.py b/git/refs/symbolic.py
index 9937cf0c..9937cf0c 100644
--- a/refs/symbolic.py
+++ b/git/refs/symbolic.py
diff --git a/refs/tag.py b/git/refs/tag.py
index c09d814d..c09d814d 100644
--- a/refs/tag.py
+++ b/git/refs/tag.py
diff --git a/remote.py b/git/remote.py
index 69a8126b..69a8126b 100644
--- a/remote.py
+++ b/git/remote.py
diff --git a/repo/__init__.py b/git/repo/__init__.py
index 8902a254..8902a254 100644
--- a/repo/__init__.py
+++ b/git/repo/__init__.py
diff --git a/repo/base.py b/git/repo/base.py
index e26da101..e26da101 100644
--- a/repo/base.py
+++ b/git/repo/base.py
diff --git a/repo/fun.py b/git/repo/fun.py
index 7a5984d3..7a5984d3 100644
--- a/repo/fun.py
+++ b/git/repo/fun.py
diff --git a/test/__init__.py b/git/test/__init__.py
index 757cbad1..757cbad1 100644
--- a/test/__init__.py
+++ b/git/test/__init__.py
diff --git a/test/fixtures/blame b/git/test/fixtures/blame
index 10c141dd..10c141dd 100644
--- a/test/fixtures/blame
+++ b/git/test/fixtures/blame
diff --git a/test/fixtures/cat_file_blob b/git/test/fixtures/cat_file_blob
index 70c379b6..70c379b6 100644
--- a/test/fixtures/cat_file_blob
+++ b/git/test/fixtures/cat_file_blob
diff --git a/test/fixtures/cat_file_blob_nl b/git/test/fixtures/cat_file_blob_nl
index 802992c4..802992c4 100644
--- a/test/fixtures/cat_file_blob_nl
+++ b/git/test/fixtures/cat_file_blob_nl
diff --git a/test/fixtures/cat_file_blob_size b/git/test/fixtures/cat_file_blob_size
index b4de3947..b4de3947 100644
--- a/test/fixtures/cat_file_blob_size
+++ b/git/test/fixtures/cat_file_blob_size
diff --git a/test/fixtures/diff_2 b/git/test/fixtures/diff_2
index 218b6bae..218b6bae 100644
--- a/test/fixtures/diff_2
+++ b/git/test/fixtures/diff_2
diff --git a/test/fixtures/diff_2f b/git/test/fixtures/diff_2f
index 5246cd6b..5246cd6b 100644
--- a/test/fixtures/diff_2f
+++ b/git/test/fixtures/diff_2f
diff --git a/test/fixtures/diff_f b/git/test/fixtures/diff_f
index 48a49256..48a49256 100644
--- a/test/fixtures/diff_f
+++ b/git/test/fixtures/diff_f
diff --git a/test/fixtures/diff_i b/git/test/fixtures/diff_i
index cec64e1d..cec64e1d 100644
--- a/test/fixtures/diff_i
+++ b/git/test/fixtures/diff_i
diff --git a/test/fixtures/diff_mode_only b/git/test/fixtures/diff_mode_only
index 6fc18f69..6fc18f69 100755
--- a/test/fixtures/diff_mode_only
+++ b/git/test/fixtures/diff_mode_only
diff --git a/test/fixtures/diff_new_mode b/git/test/fixtures/diff_new_mode
index 29705386..29705386 100644
--- a/test/fixtures/diff_new_mode
+++ b/git/test/fixtures/diff_new_mode
diff --git a/test/fixtures/diff_numstat b/git/test/fixtures/diff_numstat
index 44c6ca2d..44c6ca2d 100644
--- a/test/fixtures/diff_numstat
+++ b/git/test/fixtures/diff_numstat
diff --git a/test/fixtures/diff_p b/git/test/fixtures/diff_p
index af4759e5..af4759e5 100644
--- a/test/fixtures/diff_p
+++ b/git/test/fixtures/diff_p
diff --git a/test/fixtures/diff_rename b/git/test/fixtures/diff_rename
index 13abae0e..13abae0e 100644
--- a/test/fixtures/diff_rename
+++ b/git/test/fixtures/diff_rename
diff --git a/test/fixtures/diff_tree_numstat_root b/git/test/fixtures/diff_tree_numstat_root
index bebdaa6d..bebdaa6d 100644
--- a/test/fixtures/diff_tree_numstat_root
+++ b/git/test/fixtures/diff_tree_numstat_root
diff --git a/test/fixtures/for_each_ref_with_path_component b/git/test/fixtures/for_each_ref_with_path_component
index e723b4ae..e723b4ae 100644
--- a/test/fixtures/for_each_ref_with_path_component
+++ b/git/test/fixtures/for_each_ref_with_path_component
Binary files differ
diff --git a/test/fixtures/git_config b/git/test/fixtures/git_config
index 3c91985f..3c91985f 100644
--- a/test/fixtures/git_config
+++ b/git/test/fixtures/git_config
diff --git a/test/fixtures/git_config_global b/git/test/fixtures/git_config_global
index 1a55397f..1a55397f 100644
--- a/test/fixtures/git_config_global
+++ b/git/test/fixtures/git_config_global
diff --git a/test/fixtures/index b/git/test/fixtures/index
index 40914bac..40914bac 100644
--- a/test/fixtures/index
+++ b/git/test/fixtures/index
Binary files differ
diff --git a/test/fixtures/index_merge b/git/test/fixtures/index_merge
index 2a743455..2a743455 100644
--- a/test/fixtures/index_merge
+++ b/git/test/fixtures/index_merge
Binary files differ
diff --git a/test/fixtures/ls_tree_a b/git/test/fixtures/ls_tree_a
index 69b76f4a..69b76f4a 100644
--- a/test/fixtures/ls_tree_a
+++ b/git/test/fixtures/ls_tree_a
diff --git a/test/fixtures/ls_tree_b b/git/test/fixtures/ls_tree_b
index 329aff39..329aff39 100644
--- a/test/fixtures/ls_tree_b
+++ b/git/test/fixtures/ls_tree_b
diff --git a/test/fixtures/ls_tree_commit b/git/test/fixtures/ls_tree_commit
index d97aca04..d97aca04 100644
--- a/test/fixtures/ls_tree_commit
+++ b/git/test/fixtures/ls_tree_commit
diff --git a/test/fixtures/reflog_HEAD b/git/test/fixtures/reflog_HEAD
index 7b2272ac..7b2272ac 100644
--- a/test/fixtures/reflog_HEAD
+++ b/git/test/fixtures/reflog_HEAD
diff --git a/test/fixtures/reflog_invalid_date b/git/test/fixtures/reflog_invalid_date
index 938e4f75..938e4f75 100644
--- a/test/fixtures/reflog_invalid_date
+++ b/git/test/fixtures/reflog_invalid_date
diff --git a/test/fixtures/reflog_invalid_email b/git/test/fixtures/reflog_invalid_email
index 121096aa..121096aa 100644
--- a/test/fixtures/reflog_invalid_email
+++ b/git/test/fixtures/reflog_invalid_email
diff --git a/test/fixtures/reflog_invalid_newsha b/git/test/fixtures/reflog_invalid_newsha
index 0d45bb7a..0d45bb7a 100644
--- a/test/fixtures/reflog_invalid_newsha
+++ b/git/test/fixtures/reflog_invalid_newsha
diff --git a/test/fixtures/reflog_invalid_oldsha b/git/test/fixtures/reflog_invalid_oldsha
index b78605ff..b78605ff 100644
--- a/test/fixtures/reflog_invalid_oldsha
+++ b/git/test/fixtures/reflog_invalid_oldsha
diff --git a/test/fixtures/reflog_invalid_sep b/git/test/fixtures/reflog_invalid_sep
index fddcd6e5..fddcd6e5 100644
--- a/test/fixtures/reflog_invalid_sep
+++ b/git/test/fixtures/reflog_invalid_sep
diff --git a/test/fixtures/reflog_master b/git/test/fixtures/reflog_master
index 2fa13e21..2fa13e21 100644
--- a/test/fixtures/reflog_master
+++ b/git/test/fixtures/reflog_master
diff --git a/test/fixtures/rev_list b/git/test/fixtures/rev_list
index 1a576118..1a576118 100644
--- a/test/fixtures/rev_list
+++ b/git/test/fixtures/rev_list
diff --git a/test/fixtures/rev_list_bisect_all b/git/test/fixtures/rev_list_bisect_all
index 810b6609..810b6609 100644
--- a/test/fixtures/rev_list_bisect_all
+++ b/git/test/fixtures/rev_list_bisect_all
diff --git a/test/fixtures/rev_list_commit_diffs b/git/test/fixtures/rev_list_commit_diffs
index 20397e2e..20397e2e 100644
--- a/test/fixtures/rev_list_commit_diffs
+++ b/git/test/fixtures/rev_list_commit_diffs
diff --git a/test/fixtures/rev_list_commit_idabbrev b/git/test/fixtures/rev_list_commit_idabbrev
index 9385ba71..9385ba71 100644
--- a/test/fixtures/rev_list_commit_idabbrev
+++ b/git/test/fixtures/rev_list_commit_idabbrev
diff --git a/test/fixtures/rev_list_commit_stats b/git/test/fixtures/rev_list_commit_stats
index 60aa8cf5..60aa8cf5 100644
--- a/test/fixtures/rev_list_commit_stats
+++ b/git/test/fixtures/rev_list_commit_stats
diff --git a/test/fixtures/rev_list_count b/git/test/fixtures/rev_list_count
index a802c139..a802c139 100644
--- a/test/fixtures/rev_list_count
+++ b/git/test/fixtures/rev_list_count
diff --git a/test/fixtures/rev_list_delta_a b/git/test/fixtures/rev_list_delta_a
index 023c5515..023c5515 100644
--- a/test/fixtures/rev_list_delta_a
+++ b/git/test/fixtures/rev_list_delta_a
diff --git a/test/fixtures/rev_list_delta_b b/git/test/fixtures/rev_list_delta_b
index aea7187f..aea7187f 100644
--- a/test/fixtures/rev_list_delta_b
+++ b/git/test/fixtures/rev_list_delta_b
diff --git a/test/fixtures/rev_list_single b/git/test/fixtures/rev_list_single
index d8c6431e..d8c6431e 100644
--- a/test/fixtures/rev_list_single
+++ b/git/test/fixtures/rev_list_single
diff --git a/test/fixtures/rev_parse b/git/test/fixtures/rev_parse
index a639d89e..a639d89e 100644
--- a/test/fixtures/rev_parse
+++ b/git/test/fixtures/rev_parse
diff --git a/test/fixtures/show_empty_commit b/git/test/fixtures/show_empty_commit
index ea25e32a..ea25e32a 100644
--- a/test/fixtures/show_empty_commit
+++ b/git/test/fixtures/show_empty_commit
diff --git a/test/lib/__init__.py b/git/test/lib/__init__.py
index 77512794..77512794 100644
--- a/test/lib/__init__.py
+++ b/git/test/lib/__init__.py
diff --git a/test/lib/asserts.py b/git/test/lib/asserts.py
index fa754b92..fa754b92 100644
--- a/test/lib/asserts.py
+++ b/git/test/lib/asserts.py
diff --git a/test/lib/helper.py b/git/test/lib/helper.py
index 4e7b5cf6..76aaaa38 100644
--- a/test/lib/helper.py
+++ b/git/test/lib/helper.py
@@ -12,7 +12,7 @@ import tempfile
import shutil
import cStringIO
-GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
+GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
__all__ = (
'fixture_path', 'fixture', 'absolute_project_path', 'StringProcessAdapter',
diff --git a/test/performance/lib.py b/git/test/performance/lib.py
index d0727b60..d0727b60 100644
--- a/test/performance/lib.py
+++ b/git/test/performance/lib.py
diff --git a/test/performance/test_commit.py b/git/test/performance/test_commit.py
index 80421aa2..80421aa2 100644
--- a/test/performance/test_commit.py
+++ b/git/test/performance/test_commit.py
diff --git a/test/performance/test_odb.py b/git/test/performance/test_odb.py
index 32b70f69..32b70f69 100644
--- a/test/performance/test_odb.py
+++ b/git/test/performance/test_odb.py
diff --git a/test/performance/test_streams.py b/git/test/performance/test_streams.py
index 7f17d722..7f17d722 100644
--- a/test/performance/test_streams.py
+++ b/git/test/performance/test_streams.py
diff --git a/test/performance/test_utils.py b/git/test/performance/test_utils.py
index 19c1e84a..19c1e84a 100644
--- a/test/performance/test_utils.py
+++ b/git/test/performance/test_utils.py
diff --git a/test/test_actor.py b/git/test/test_actor.py
index b8e5ba3b..b8e5ba3b 100644
--- a/test/test_actor.py
+++ b/git/test/test_actor.py
diff --git a/test/test_base.py b/git/test/test_base.py
index e630d151..e630d151 100644
--- a/test/test_base.py
+++ b/git/test/test_base.py
diff --git a/test/test_blob.py b/git/test/test_blob.py
index 661c0501..661c0501 100644
--- a/test/test_blob.py
+++ b/git/test/test_blob.py
diff --git a/test/test_commit.py b/git/test/test_commit.py
index 4a8d8b87..4a8d8b87 100644
--- a/test/test_commit.py
+++ b/git/test/test_commit.py
diff --git a/test/test_config.py b/git/test/test_config.py
index 173e380c..173e380c 100644
--- a/test/test_config.py
+++ b/git/test/test_config.py
diff --git a/test/test_db.py b/git/test/test_db.py
index db2d7983..db2d7983 100644
--- a/test/test_db.py
+++ b/git/test/test_db.py
diff --git a/test/test_diff.py b/git/test/test_diff.py
index 83db2df6..83db2df6 100644
--- a/test/test_diff.py
+++ b/git/test/test_diff.py
diff --git a/test/test_fun.py b/git/test/test_fun.py
index b7991cdb..b7991cdb 100644
--- a/test/test_fun.py
+++ b/git/test/test_fun.py
diff --git a/test/test_git.py b/git/test/test_git.py
index c92a642b..c92a642b 100644
--- a/test/test_git.py
+++ b/git/test/test_git.py
diff --git a/test/test_index.py b/git/test/test_index.py
index 5d227897..5d227897 100644
--- a/test/test_index.py
+++ b/git/test/test_index.py
diff --git a/test/test_reflog.py b/git/test/test_reflog.py
index 3fdf1fae..3fdf1fae 100644
--- a/test/test_reflog.py
+++ b/git/test/test_reflog.py
diff --git a/test/test_refs.py b/git/test/test_refs.py
index 2338b4e4..2338b4e4 100644
--- a/test/test_refs.py
+++ b/git/test/test_refs.py
diff --git a/test/test_remote.py b/git/test/test_remote.py
index af6915a3..af6915a3 100644
--- a/test/test_remote.py
+++ b/git/test/test_remote.py
diff --git a/test/test_repo.py b/git/test/test_repo.py
index f517b9f1..f517b9f1 100644
--- a/test/test_repo.py
+++ b/git/test/test_repo.py
diff --git a/test/test_stats.py b/git/test/test_stats.py
index 2bdb0a89..2bdb0a89 100644
--- a/test/test_stats.py
+++ b/git/test/test_stats.py
diff --git a/test/test_submodule.py b/git/test/test_submodule.py
index b8a25e02..3a0c5208 100644
--- a/test/test_submodule.py
+++ b/git/test/test_submodule.py
@@ -20,7 +20,7 @@ prog = TestRootProgress()
class TestSubmodule(TestBase):
- k_subm_current = "83a9e4a0dad595188ff3fb35bc3dfc4d931eff6d"
+ k_subm_current = "cb68eef0865df6aedbc11cd81888625a70da6777"
k_subm_changed = "394ed7006ee5dc8bddfd132b64001d5dfc0ffdd3"
k_no_subm_tag = "0.1.6"
@@ -40,7 +40,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 == 'ext/gitdb'
+ assert sm.path == 'git/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 ...
@@ -184,7 +184,7 @@ class TestSubmodule(TestBase):
sm.update(recursive=True, dry_run=True, progress=prog)
assert not csm.module_exists()
- # update recuesively again
+ # update recursively again
sm.update(recursive=True)
assert csm.module_exists()
@@ -237,6 +237,7 @@ class TestSubmodule(TestBase):
# deletion will fail
# NOTE: As we did a few updates in the meanwhile, the indices were reset
# Hence we create some changes
+ csm.set_parent_commit(csm.repo.head.commit)
sm.config_writer().set_value("somekey", "somevalue")
csm.config_writer().set_value("okey", "ovalue")
self.failUnlessRaises(InvalidGitRepositoryError, sm.remove)
diff --git a/test/test_tree.py b/git/test/test_tree.py
index ec10e962..ec10e962 100644
--- a/test/test_tree.py
+++ b/git/test/test_tree.py
diff --git a/test/test_util.py b/git/test/test_util.py
index e55a6d15..e55a6d15 100644
--- a/test/test_util.py
+++ b/git/test/test_util.py
diff --git a/util.py b/git/util.py
index 8c0b6697..8c0b6697 100644
--- a/util.py
+++ b/git/util.py
diff --git a/setup.py b/setup.py
index 54d78c50..c18d80b5 100755
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,7 @@ except ImportError:
from distutils.command.build_py import build_py as _build_py
from setuptools.command.sdist import sdist as _sdist
import os
+import sys
from os import path
v = open(path.join(path.dirname(__file__), 'VERSION'))
@@ -29,8 +30,8 @@ class build_py(_build_py):
class sdist(_sdist):
def make_release_tree (self, base_dir, files):
_sdist.make_release_tree(self, base_dir, files)
- orig = '__init__.py'
- assert path.exists(orig)
+ orig = path.join('git', '__init__.py')
+ assert path.exists(orig), orig
dest = path.join(base_dir, orig)
if hasattr(os, 'link') and path.exists(dest):
os.unlink(dest)
@@ -40,7 +41,12 @@ class sdist(_sdist):
def _stamp_version(filename):
found, out = False, []
- f = open(filename, 'r')
+ try:
+ f = open(filename, 'r')
+ except (IOError, OSError):
+ print >> sys.stderr, "Couldn't find file %s to stamp version" % filename
+ return
+ #END handle error, usually happens during binary builds
for line in f:
if '__version__ =' in line:
line = line.replace("'git'", "'%s'" % VERSION)