Skip to content

Commit 6c1faef

Browse files
committed
Removed odb from project, it is now used as a submodule named gitdb, which was added instead
Adjusted all imports to deal with the changed package names
1 parent 86ea635 commit 6c1faef

20 files changed

+34
-1363
lines changed

.gitmodules

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

lib/git/__init__.py

+18-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,25 @@
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

77
import os
8+
import sys
89
import inspect
910

1011
__version__ = 'git'
1112

13+
14+
#{ Initialization
15+
def _init_externals():
16+
"""Initialize external projects by putting them into the path"""
17+
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext'))
18+
19+
#} END initialization
20+
21+
#################
22+
_init_externals()
23+
#################
24+
25+
#{ Imports
26+
1227
from git.config import GitConfigParser
1328
from git.objects import *
1429
from git.refs import *
@@ -22,8 +37,8 @@
2237
from git.index import *
2338
from git.utils import LockFile, BlockingLockFile
2439

25-
# odb is NOT imported intentionally - if you really want it, you should get it
26-
# yourself as its part of the core
40+
#} END imports
2741

2842
__all__ = [ name for name, obj in locals().items()
29-
if not (name.startswith('_') or inspect.ismodule(obj)) ]
43+
if not (name.startswith('_') or inspect.ismodule(obj)) ]
44+

lib/git/errors.py

-12
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@
1010
class InvalidGitRepositoryError(Exception):
1111
""" Thrown if the given repository appears to have an invalid format. """
1212

13-
class ODBError(Exception):
14-
"""All errors thrown by the object database"""
15-
16-
class InvalidDBRoot(ODBError):
17-
"""Thrown if an object database cannot be initialized at the given path"""
18-
19-
class BadObject(ODBError):
20-
"""The object with the given SHA does not exist"""
21-
22-
class BadObjectType(ODBError):
23-
"""The object had an unsupported type"""
24-
2513
class NoSuchPathError(OSError):
2614
""" Thrown if a path could not be access by the system. """
2715

lib/git/ext/gitdb

Submodule gitdb added at 10fef8f

lib/git/objects/commit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import git.stats as stats
1010
from git.actor import Actor
1111
from tree import Tree
12-
from git.odb import IStream
12+
from gitdb import IStream
1313
from cStringIO import StringIO
1414
import base
1515
import utils

lib/git/odb/__init__.py

-6
This file was deleted.

0 commit comments

Comments
 (0)