summaryrefslogtreecommitdiff
path: root/lib/git/utils.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-28 19:15:42 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-28 19:15:54 +0200
commit1fe889ea0cb2547584075dc1eb77f52c54b9a8c4 (patch)
treecd3685e0bd87441eab4888efbc4e14a232a65a7b /lib/git/utils.py
parent47e3138ee978ce708a41f38a0d874376d7ae5c78 (diff)
downloadgitpython-1fe889ea0cb2547584075dc1eb77f52c54b9a8c4.tar.gz
All tests adjusted to work with the changed internal sha representation
Diffstat (limited to 'lib/git/utils.py')
-rw-r--r--lib/git/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/git/utils.py b/lib/git/utils.py
index b224cb97..e49fcc2a 100644
--- a/lib/git/utils.py
+++ b/lib/git/utils.py
@@ -18,6 +18,9 @@ from gitdb.util import (
to_bin_sha
)
+__all__ = ( "stream_copy", "join_path", "to_native_path_windows", "to_native_path_linux",
+ "join_path_native", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList",
+ "BlockingLockFile", "LockFile" )
def stream_copy(source, destination, chunk_size=512*1024):
"""Copy all data from the source stream into the destination stream in chunks
@@ -104,7 +107,7 @@ class Stats(object):
"""Create a Stat object from output retrieved by git-diff.
:return: git.Stat"""
- hsh = {'total': {'insertions': 0, 'deletions': 0, 'lines': 0, 'files': 0}, 'files': {}}
+ hsh = {'total': {'insertions': 0, 'deletions': 0, 'lines': 0, 'files': 0}, 'files': dict()}
for line in text.splitlines():
(raw_insertions, raw_deletions, filename) = line.split("\t")
insertions = raw_insertions != '-' and int(raw_insertions) or 0
@@ -305,6 +308,7 @@ class IterableList(list):
except AttributeError:
raise IndexError( "No item found with id %r" % (self._prefix + index) )
+
class Iterable(object):
"""Defines an interface for iterable items which is to assure a uniform
way to retrieve and iterate items within the git repository"""