From 2af455266cb3ea454c4f38b182825b9e78b8398d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 27 Jul 2016 09:32:29 +0300 Subject: [PATCH] Spelling fixes --- doc/source/algorithm.rst | 2 +- doc/source/changes.rst | 2 +- gitdb/db/base.py | 2 +- gitdb/db/loose.py | 2 +- gitdb/db/mem.py | 2 +- gitdb/pack.py | 4 ++-- gitdb/stream.py | 2 +- gitdb/test/db/test_loose.py | 2 +- gitdb/test/lib.py | 2 +- gitdb/test/test_pack.py | 2 +- gitdb/test/test_util.py | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/source/algorithm.rst b/doc/source/algorithm.rst index 4374cb8..2e01b3f 100644 --- a/doc/source/algorithm.rst +++ b/doc/source/algorithm.rst @@ -92,6 +92,6 @@ Future work Another very promising option is that streaming of delta data is indeed possible. Depending on the configuration of the copy-from-base operations, different optimizations could be applied to reduce the amount of memory required for the final processed delta stream. Some configurations may even allow it to stream data from the base buffer, instead of pre-loading it for random access. -The ability to stream files at reduced memory costs would only be feasible for big files, and would have to be payed with extra pre-processing time. +The ability to stream files at reduced memory costs would only be feasible for big files, and would have to be paid with extra pre-processing time. A very first and simple implementation could avoid memory peaks by streaming the TDS in conjunction with a base buffer, instead of writing everything into a fully allocated target buffer. diff --git a/doc/source/changes.rst b/doc/source/changes.rst index a36fd65..22deb6d 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -8,7 +8,7 @@ Changelog * Fixed possibly critical error, see https://github.com/gitpython-developers/GitPython/issues/220 - - However, it only seems to occour on high-entropy data and didn't reoccour after the fix + - However, it only seems to occur on high-entropy data and didn't reoccour after the fix ***** 0.6.0 diff --git a/gitdb/db/base.py b/gitdb/db/base.py index 2615b13..2d7b9fa 100644 --- a/gitdb/db/base.py +++ b/gitdb/db/base.py @@ -177,7 +177,7 @@ def _db_query(self, sha): """:return: database containing the given 20 byte sha :raise BadObject:""" # most databases use binary representations, prevent converting - # it everytime a database is being queried + # it every time a database is being queried try: return self._db_cache[sha] except KeyError: diff --git a/gitdb/db/loose.py b/gitdb/db/loose.py index 1355e1c..192c524 100644 --- a/gitdb/db/loose.py +++ b/gitdb/db/loose.py @@ -174,7 +174,7 @@ def has_object(self, sha): return True except BadObject: return False - # END check existance + # END check existence def store(self, istream): """note: The sha we produce will be hex by nature""" diff --git a/gitdb/db/mem.py b/gitdb/db/mem.py index 595dbf4..8711334 100644 --- a/gitdb/db/mem.py +++ b/gitdb/db/mem.py @@ -98,7 +98,7 @@ def stream_copy(self, sha_iter, odb): for sha in sha_iter: if odb.has_object(sha): continue - # END check object existance + # END check object existence ostream = self.stream(sha) # compressed data including header diff --git a/gitdb/pack.py b/gitdb/pack.py index 511e557..2447455 100644 --- a/gitdb/pack.py +++ b/gitdb/pack.py @@ -85,7 +85,7 @@ def pack_object_at(cursor, offset, as_stream): an object of the correct type according to the type_id of the object. If as_stream is True, the object will contain a stream, allowing the data to be read decompressed. - :param data: random accessable data containing all required information + :param data: random accessible data containing all required information :parma offset: offset in to the data at which the object information is located :param as_stream: if True, a stream object will be returned that can read the data, otherwise you receive an info object only""" @@ -447,7 +447,7 @@ def partial_sha_to_index(self, partial_bin_sha, canonical_length): :return: index as in `sha_to_index` or None if the sha was not found in this index file :param partial_bin_sha: an at least two bytes of a partial binary sha as bytes - :param canonical_length: lenght of the original hexadecimal representation of the + :param canonical_length: length of the original hexadecimal representation of the given partial binary sha :raise AmbiguousObjectName:""" if len(partial_bin_sha) < 2: diff --git a/gitdb/stream.py b/gitdb/stream.py index 04dd79f..be95c11 100644 --- a/gitdb/stream.py +++ b/gitdb/stream.py @@ -660,7 +660,7 @@ def __init__(self, fd): def write(self, data): """:raise IOError: If not all bytes could be written - :return: lenght of incoming data""" + :return: length of incoming data""" self.sha1.update(data) cdata = self.zip.compress(data) bytes_written = write(self.fd, cdata) diff --git a/gitdb/test/db/test_loose.py b/gitdb/test/db/test_loose.py index 024c194..9c25a02 100644 --- a/gitdb/test/db/test_loose.py +++ b/gitdb/test/db/test_loose.py @@ -33,4 +33,4 @@ def test_basics(self, path): # END for each sha self.failUnlessRaises(BadObject, ldb.partial_to_complete_sha_hex, '0000') - # raises if no object could be foudn + # raises if no object could be found diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py index a089eac..bbdd241 100644 --- a/gitdb/test/lib.py +++ b/gitdb/test/lib.py @@ -76,7 +76,7 @@ def wrapper(self, *args, **kwargs): def with_rw_directory(func): """Create a temporary directory which can be written to, remove it if the - test suceeds, but leave it otherwise to aid additional debugging""" + test succeeds, but leave it otherwise to aid additional debugging""" def wrapper(self): path = tempfile.mktemp(prefix=func.__name__) diff --git a/gitdb/test/test_pack.py b/gitdb/test/test_pack.py index ff10572..a8b0b60 100644 --- a/gitdb/test/test_pack.py +++ b/gitdb/test/test_pack.py @@ -232,7 +232,7 @@ def rewind_streams(): # END verify files exist # END for each packpath, indexpath pair - # verify the packs throughly + # verify the packs thoroughly rewind_streams() entity = PackEntity.create(pack_objs, rw_dir) count = 0 diff --git a/gitdb/test/test_util.py b/gitdb/test/test_util.py index 1dee544..5026f4e 100644 --- a/gitdb/test/test_util.py +++ b/gitdb/test/test_util.py @@ -60,7 +60,7 @@ def test_lockedfd(self): self._cmp_contents(my_file, orig_data) assert not os.path.isfile(lockfilepath) - # additional call doesnt fail + # additional call doesn't fail lfd.commit() lfd.rollback()