Skip to content

Commit

Permalink
Merge branch 'py2n3'
Browse files Browse the repository at this point in the history
* python 3 compatibility
* all tests work in py2.6, 2.7, 3.3, 3.4
  • Loading branch information
Byron committed Nov 14, 2014
2 parents 81707c6 + 0dcec5a commit 2f2fe4e
Show file tree
Hide file tree
Showing 47 changed files with 1,767 additions and 1,826 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "async"]
path = gitdb/ext/async
url = https://github.com/gitpython-developers/async.git
[submodule "smmap"]
path = gitdb/ext/smmap
url = https://github.com/Byron/smmap.git
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
# - "pypy" - won't work as smmap doesn't work (see smmap/.travis.yml for details)

script: nosetests
git:
# a higher depth is needed for one of the tests - lets fet
depth: 1000
install:
- pip install coveralls
script:
- nosetests -v
after_success:
- coveralls

33 changes: 19 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
GitDB
=====

GitDB allows you to access bare git repositories for reading and writing. It
aims at allowing full access to loose objects as well as packs with performance
and scalability in mind. It operates exclusively on streams, allowing to operate
on large objects with a small memory footprint.
GitDB allows you to access bare git repositories for reading and writing. It aims at allowing full access to loose objects as well as packs with performance and scalability in mind. It operates exclusively on streams, allowing to handle large objects with a small memory footprint.

Installation
============
Expand All @@ -23,13 +20,13 @@ From `PyPI <https://pypi.python.org/pypi/gitdb>`_
REQUIREMENTS
============

* Python Nose - for running the tests
* Python Nose - for running the tests

SOURCE
======
The source is available in a git repository at gitorious and github:

git://github.com/gitpython-developers/gitdb.git
https://github.com/gitpython-developers/gitdb

Once the clone is complete, please be sure to initialize the submodules using

Expand All @@ -40,17 +37,25 @@ Run the tests with

nosetests

MAILING LIST
============
http://groups.google.com/group/git-python

ISSUE TRACKER
=============
DEVELOPMENT
===========

.. image:: https://travis-ci.org/gitpython-developers/gitdb.svg?branch=master
:target: https://travis-ci.org/gitpython-developers/gitdb

https://github.com/gitpython-developers/gitdb/issues

.. image:: https://coveralls.io/repos/gitpython-developers/gitdb/badge.png
:target: https://coveralls.io/r/gitpython-developers/gitdb

The library is considered mature, and not under active development. It's primary (known) use is in git-python.

INFRASTRUCTURE
==============

* Mailing List
* http://groups.google.com/group/git-python

* Issue Tracker
* https://github.com/gitpython-developers/gitdb/issues

LICENSE
=======
Expand Down
7 changes: 7 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog
#########

*****
0.6.0
*****

* Added support got python 3.X
* Removed all `async` dependencies and all `*_async` versions of methods with it.

*****
0.5.4
*****
Expand Down
8 changes: 3 additions & 5 deletions doc/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Interfaces are used to describe the API, making it easy to provide alternate imp
================
Installing GitDB
================
Its easiest to install gitdb using the *easy_install* program, which is part of the `setuptools`_::
Its easiest to install gitdb using the *pip* program::
$ easy_install gitdb
$ pip install gitdb
As the command will install gitdb in your respective python distribution, you will most likely need root permissions to authorize the required changes.

Expand All @@ -31,10 +31,8 @@ Source Repository
=================
The latest source can be cloned using git from github:

* git://github.com/gitpython-developers/gitdb.git
* https://github.com/gitpython-developers/gitdb

License Information
===================
*GitDB* is licensed under the New BSD License.

.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
15 changes: 7 additions & 8 deletions gitdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,28 @@
#{ Initialization
def _init_externals():
"""Initialize external projects by putting them into the path"""
for module in ('async', 'smmap'):
for module in ('smmap',):
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', module))

try:
__import__(module)
except ImportError:
raise ImportError("'%s' could not be imported, assure it is located in your PYTHONPATH" % module)
#END verify import
#END handel imports

#} END initialization

_init_externals()

__author__ = "Sebastian Thiel"
__contact__ = "byronimo@gmail.com"
__homepage__ = "https://github.com/gitpython-developers/gitdb"
version_info = (0, 5, 4)
version_info = (0, 6, 0)
__version__ = '.'.join(str(i) for i in version_info)


# default imports
from db import *
from base import *
from stream import *

from gitdb.base import *
from gitdb.db import *
from gitdb.stream import *
2 changes: 0 additions & 2 deletions gitdb/_delta_apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ DeltaInfo* DIV_closest_chunk(const DeltaInfoVector* vec, ull ofs)
// Return the amount of chunks a slice at the given spot would have, as well as
// its size in bytes it would have if the possibly partial chunks would be encoded
// and added to the spot marked by sdc
inline
uint DIV_count_slice_bytes(const DeltaInfoVector* src, uint ofs, uint size)
{
uint num_bytes = 0;
Expand Down Expand Up @@ -559,7 +558,6 @@ uint DIV_count_slice_bytes(const DeltaInfoVector* src, uint ofs, uint size)
// destination memory. The individual chunks written will be a byte copy of the source
// data chunk stream
// Return: number of chunks in the slice
inline
uint DIV_copy_slice_to(const DeltaInfoVector* src, uchar** dest, ull tofs, uint size)
{
assert(DIV_lbound(src) <= tofs);
Expand Down

0 comments on commit 2f2fe4e

Please sign in to comment.