Skip to content

Commit 4b1831f

Browse files
committed
Merge branch 'structure'
2 parents 9f977b8 + 88d500e commit 4b1831f

Some content is hidden

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

52 files changed

+33
-30
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "async"]
2-
path = ext/async
3-
url = git://github.com/Byron/async.git
2+
path = gitdb/ext/async
3+
url = git://github.com/gitpython-developers/async.git

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ include CHANGES
44
include AUTHORS
55
include README
66

7-
include _fun.c
8-
include _delta_apply.c
9-
include _delta_apply.h
7+
include gitdb/_fun.c
8+
include gitdb/_delta_apply.c
9+
include gitdb/_delta_apply.h
1010

11-
graft test
11+
prune gitdb/test
1212

1313
global-exclude .git*
1414
global-exclude *.pyc

README renamed to README.rst

Lines changed: 2 additions & 3 deletions

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
sys.path.append(os.path.abspath('../../../'))
19+
sys.path.append(os.path.abspath('../../'))
2020

2121
# -- General configuration -----------------------------------------------------
2222

doc/source/intro.rst

Lines changed: 2 additions & 3 deletions

doc/source/tutorial.rst

Lines changed: 1 addition & 1 deletion

ext/async

Lines changed: 0 additions & 1 deletion
This file was deleted.

__init__.py renamed to gitdb/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
#{ Initialization
77
def _init_externals():
88
"""Initialize external projects by putting them into the path"""
9-
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext'))
9+
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'async'))
10+
11+
try:
12+
import async
13+
except ImportError:
14+
raise ImportError("'async' could not be imported, assure it is located in your PYTHONPATH")
15+
#END verify import
1016

1117
#} END initialization
1218

File renamed without changes.
File renamed without changes.

_fun.c renamed to gitdb/_fun.c

File renamed without changes.

base.py renamed to gitdb/base.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.

exc.py renamed to gitdb/exc.py

File renamed without changes.

gitdb/ext/async

Submodule async added at 89790ab

fun.py renamed to gitdb/fun.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444

4545
__all__ = ('is_loose_object', 'loose_object_header_info', 'msb_size', 'pack_object_header_info',
4646
'write_object', 'loose_object_header', 'stream_copy', 'apply_delta_data',
47-
'is_equal_canonical_sha', 'reverse_connect_deltas',
48-
'connect_deltas', 'DeltaChunkList')
47+
'is_equal_canonical_sha', 'connect_deltas', 'DeltaChunkList')
4948

5049

5150
#{ Structures
@@ -492,8 +491,10 @@ def stream_copy(read, write, size, chunk_size):
492491
return dbw
493492

494493
def connect_deltas(dstreams):
495-
"""Read the condensed delta chunk information from dstream and merge its information
496-
into a list of existing delta chunks
494+
"""
495+
Read the condensed delta chunk information from dstream and merge its information
496+
into a list of existing delta chunks
497+
497498
:param dstreams: iterable of delta stream objects, the delta to be applied last
498499
comes first, then all its ancestors in order
499500
:return: DeltaChunkList, containing all operations to apply"""

pack.py renamed to gitdb/pack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def is_valid_stream(self, sha, use_crc=False):
651651
652652
:param use_crc: if True, the index' crc for the sha is used to determine
653653
:param sha: 20 byte sha1 of the object whose stream to verify
654-
whether the compressed stream of the object is valid. If it is
654+
whether the compressed stream of the object is valid. If it is
655655
a delta, this only verifies that the delta's data is valid, not the
656656
data of the actual undeltified object, as it depends on more than
657657
just this stream.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/db/test_git.py renamed to gitdb/test/db/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TestGitDB(TestDBBase):
88

99
def test_reading(self):
10-
gdb = GitDB(fixture_path('../../.git/objects'))
10+
gdb = GitDB(fixture_path('../../../.git/objects'))
1111

1212
# we have packs and loose objects, alternates doesn't necessarily exist
1313
assert 1 < len(gdb.databases()) < 4
File renamed without changes.
File renamed without changes.

test/db/test_pack.py renamed to gitdb/test/db/test_pack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def test_writing(self, path):
1515
pdb = PackedDB(path)
1616

1717
# on demand, we init our pack cache
18-
num_packs = 2
19-
assert len(pdb.entities()) == num_packs
18+
num_packs = len(pdb.entities())
2019
assert pdb._st_mtime != 0
2120

2221
# test pack directory changed:

test/db/test_ref.py renamed to gitdb/test/db/test_ref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_writing(self, path):
3434

3535
# setup alternate file
3636
# add two, one is invalid
37-
own_repo_path = fixture_path('../../.git/objects') # use own repo
37+
own_repo_path = fixture_path('../../../.git/objects') # use own repo
3838
self.make_alt_file(alt_path, [own_repo_path, "invalid/path"])
3939
rdb.update_cache()
4040
assert len(rdb.databases()) == 1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/test_example.py renamed to gitdb/test/test_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class TestExamples(TestBase):
1212

1313
def test_base(self):
14-
ldb = LooseObjectDB(fixture_path("../../.git/objects"))
14+
ldb = LooseObjectDB(fixture_path("../../../.git/objects"))
1515

1616
for sha1 in ldb.sha_iter():
1717
oinfo = ldb.info(sha1)
File renamed without changes.
File renamed without changes.
File renamed without changes.

typ.py renamed to gitdb/typ.py

File renamed without changes.

util.py renamed to gitdb/util.py

File renamed without changes.

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,9 @@ def get_data_files(self):
7575
author_email = "byronimo@gmail.com",
7676
url = "http://gitorious.org/git-python/gitdb",
7777
packages = ('gitdb', 'gitdb.db', 'gitdb.test', 'gitdb.test.db', 'gitdb.test.performance'),
78-
package_data={'gitdb' : ['AUTHORS', 'README'],
79-
'gitdb.test' : ['fixtures/packs/*', 'fixtures/objects/7b/*']},
80-
package_dir = {'gitdb':''},
81-
ext_modules=[Extension('gitdb._perf', ['_fun.c', '_delta_apply.c'], include_dirs=['.'])],
78+
package_data={ 'gitdb.test' : ['fixtures/packs/*', 'fixtures/objects/7b/*']},
79+
package_dir = {'gitdb':'gitdb'},
80+
ext_modules=[Extension('gitdb._perf', ['gitdb/_fun.c', 'gitdb/_delta_apply.c'], include_dirs=['gitdb'])],
8281
license = "BSD License",
8382
zip_safe=False,
8483
requires=('async (>=0.6.1)',),

0 commit comments

Comments
 (0)