diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | doc/source/changes.rst | 28 | ||||
-rw-r--r-- | doc/source/intro.rst | 2 | ||||
-rw-r--r-- | git/cmd.py | 6 | ||||
-rw-r--r-- | git/config.py | 6 | ||||
-rw-r--r-- | git/diff.py | 14 | ||||
-rw-r--r-- | git/exc.py | 2 | ||||
-rw-r--r-- | git/index/base.py | 12 | ||||
-rw-r--r-- | git/index/fun.py | 2 | ||||
-rw-r--r-- | git/index/util.py | 2 | ||||
-rw-r--r-- | git/objects/base.py | 6 | ||||
-rw-r--r-- | git/objects/commit.py | 4 | ||||
-rw-r--r-- | git/objects/submodule/base.py | 10 | ||||
-rw-r--r-- | git/objects/tree.py | 6 | ||||
-rw-r--r-- | git/objects/util.py | 8 | ||||
-rw-r--r-- | git/refs/head.py | 5 | ||||
-rw-r--r-- | git/refs/reference.py | 2 | ||||
-rw-r--r-- | git/refs/remote.py | 2 | ||||
-rw-r--r-- | git/refs/symbolic.py | 10 | ||||
-rw-r--r-- | git/refs/tag.py | 2 | ||||
-rw-r--r-- | git/remote.py | 10 | ||||
-rw-r--r-- | git/repo/fun.py | 6 | ||||
-rw-r--r-- | git/test/lib/helper.py | 2 | ||||
-rw-r--r-- | git/test/performance/lib.py | 2 | ||||
-rw-r--r-- | git/util.py | 8 |
25 files changed, 79 insertions, 80 deletions
@@ -83,7 +83,7 @@ exists in `Git\mingw64\libexec\git-core\`; CYGWIN has no daemon, but should get with MINGW's. The easiest way to run tests is by using [tox](https://pypi.python.org/pypi/tox) -a wrapper around virtualenv. It will take care of setting up environnements with the proper +a wrapper around virtualenv. It will take care of setting up environments with the proper dependencies installed and execute test commands. To install it simply: pip install tox diff --git a/doc/source/changes.rst b/doc/source/changes.rst index fcd8240c..657e1ad7 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -185,11 +185,11 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not 0.3.3 ===== -* When fetching, pulling or pushing, and an error occours, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing. +* When fetching, pulling or pushing, and an error occurs, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing. * Code Cleanup (in preparation for python 3 support) * Applied autopep8 and cleaned up code - * Using python logging module instead of print statments to signal certain kinds of errors + * Using python logging module instead of print statements to signal certain kinds of errors 0.3.2.1 ======= @@ -268,7 +268,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not * Head Type changes * config_reader() & config_writer() methods added for access to head specific options. - * tracking_branch() & set_tracking_branch() methods addded for easy configuration of tracking branches. + * tracking_branch() & set_tracking_branch() methods added for easy configuration of tracking branches. 0.3.0 Beta 2 @@ -300,13 +300,13 @@ General 0.2 Beta 2 =========== * Commit objects now carry the 'encoding' information of their message. It wasn't parsed previously, and defaults to UTF-8 - * Commit.create_from_tree now uses a pure-python implementation, mimicing git-commit-tree + * Commit.create_from_tree now uses a pure-python implementation, mimicking git-commit-tree 0.2 ===== General ------- -* file mode in Tree, Blob and Diff objects now is an int compatible to definintiions +* file mode in Tree, Blob and Diff objects now is an int compatible to definitions in the stat module, allowing you to query whether individual user, group and other read, write and execute bits are set. * Adjusted class hierarchy to generally allow comparison and hash for Objects and Refs @@ -320,12 +320,12 @@ General may change without prior notice. * Renamed all find_all methods to list_items - this method is part of the Iterable interface that also provides a more efficients and more responsive iter_items method -* All dates, like authored_date and committer_date, are stored as seconds since epoc +* All dates, like authored_date and committer_date, are stored as seconds since epoch to consume less memory - they can be converted using time.gmtime in a more suitable presentation format if needed. * Named method parameters changed on a wide scale to unify their use. Now git specific terms are used everywhere, such as "Reference" ( ref ) and "Revision" ( rev ). - Prevously multiple terms where used making it harder to know which type was allowed + Previously multiple terms where used making it harder to know which type was allowed or not. * Unified diff interface to allow easy diffing between trees, trees and index, trees and working tree, index and working tree, trees and index. This closely follows @@ -355,7 +355,7 @@ Blob GitCommand ----------- * git.subcommand call scheme now prunes out None from the argument list, allowing - to be called more confortably as None can never be a valid to the git command + to be called more comfortably as None can never be a valid to the git command if converted to a string. * Renamed 'git_dir' attribute to 'working_dir' which is exactly how it is used @@ -382,19 +382,19 @@ Diff Diffing ------- * Commit and Tree objects now support diffing natively with a common interface to - compare agains other Commits or Trees, against the working tree or against the index. + compare against other Commits or Trees, against the working tree or against the index. Index ----- * A new Index class allows to read and write index files directly, and to perform simple two and three way merges based on an arbitrary index. -Referernces +References ------------ * References are object that point to a Commit * SymbolicReference are a pointer to a Reference Object, which itself points to a specific Commit -* They will dynmically retrieve their object at the time of query to assure the information +* They will dynamically retrieve their object at the time of query to assure the information is actual. Recently objects would be cached, hence ref object not be safely kept persistent. @@ -403,7 +403,7 @@ Repo * Moved blame method from Blob to repo as it appeared to belong there much more. * active_branch method now returns a Head object instead of a string with the name of the active branch. -* tree method now requires a Ref instance as input and defaults to the active_branche +* tree method now requires a Ref instance as input and defaults to the active_branch instead of master * is_dirty now takes additional arguments allowing fine-grained control about what is considered dirty @@ -479,7 +479,7 @@ General * Removed ambiguity between paths and treeishs. When calling commands that accept treeish and path arguments and there is a path with the same name as a treeish git cowardly refuses to pick one and asks for the command to use - the unambiguous syntax where '--' seperates the treeish from the paths. + the unambiguous syntax where '--' separates the treeish from the paths. * ``Repo.commits``, ``Repo.commits_between``, ``Repo.commits_since``, ``Repo.commit_count``, ``Repo.commit``, ``Commit.count`` and @@ -627,7 +627,7 @@ Tree ---- * Corrected problem with ``Tree.__div__`` not working with zero length files. Removed ``__len__`` override and replaced with size instead. Also made size - cach properly. This is a breaking change. + cache properly. This is a breaking change. 0.1.1 ===== diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 1766f8ae..bfc5a778 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -92,7 +92,7 @@ Getting Started API Reference ============= -An organized section of the GitPthon API is at :ref:`api_reference_toplevel`. +An organized section of the GitPython API is at :ref:`api_reference_toplevel`. .. _source-code-label: @@ -68,10 +68,10 @@ def handle_process_output(process, stdout_handler, stderr_handler, :return: result of finalizer :param process: subprocess.Popen instance :param stdout_handler: f(stdout_line_string), or None - :param stderr_hanlder: f(stderr_line_string), or None + :param stderr_handler: f(stderr_line_string), or None :param finalizer: f(proc) - wait for proc to finish :param decode_streams: - Assume stdout/stderr streams are binary and decode them vefore pushing \ + Assume stdout/stderr streams are binary and decode them before pushing \ their contents to handlers. Set it to False if `universal_newline == True` (then streams are in text-mode) or if decoding must happen later (i.e. for Diffs). @@ -419,7 +419,7 @@ class Git(LazyMixin): def _set_cache_(self, attr): if attr == '_version_info': - # We only use the first 4 numbers, as everthing else could be strings in fact (on windows) + # We only use the first 4 numbers, as everything else could be strings in fact (on windows) version_numbers = self._call_process('version').split(' ')[2] self._version_info = tuple(int(n) for n in version_numbers.split('.')[:4] if n.isdigit()) else: diff --git a/git/config.py b/git/config.py index eddfac15..00943b58 100644 --- a/git/config.py +++ b/git/config.py @@ -194,7 +194,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje configuration files have been included :param merge_includes: if True, we will read files mentioned in [include] sections and merge their contents into ours. This makes it impossible to write back an individual configuration file. - Thus, if you want to modify a single conifguration file, turn this off to leave the original + Thus, if you want to modify a single configuration file, turn this off to leave the original dataset unaltered when reading it.""" cp.RawConfigParser.__init__(self, dict_type=OrderedDict) @@ -271,7 +271,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje """A direct copy of the py2.4 version of the super class's _read method to assure it uses ordered dicts. Had to change one line to make it work. - Future versions have this fixed, but in fact its quite embarassing for the + Future versions have this fixed, but in fact its quite embarrassing for the guys not to have done it right in the first place ! Removed big comments to make it more compact. @@ -468,7 +468,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje # end assert multiple files if self._has_includes(): - log.debug("Skipping write-back of confiuration file as include files were merged in." + + log.debug("Skipping write-back of configuration file as include files were merged in." + "Set merge_includes=False to prevent this.") return # end diff --git a/git/diff.py b/git/diff.py index 35c7ff86..96e246a2 100644 --- a/git/diff.py +++ b/git/diff.py @@ -91,11 +91,11 @@ class Diffable(object): :param paths: is a list of paths or a single path to limit the diff to. - It will only include at least one of the givne path or paths. + It will only include at least one of the given path or paths. :param create_patch: If True, the returned Diff contains a detailed patch that if applied - makes the self to other. Patches are somwhat costly as blobs have to be read + makes the self to other. Patches are somewhat costly as blobs have to be read and diffed. :param kwargs: @@ -106,7 +106,7 @@ class Diffable(object): :note: On a bare repository, 'other' needs to be provided as Index or as - as Tree/Commit, or a git command error will occour""" + as Tree/Commit, or a git command error will occur""" args = list() args.append("--abbrev=40") # we need full shas args.append("--full-index") # get full index paths, not only filenames @@ -172,7 +172,7 @@ class DiffIndex(list): def iter_change_type(self, change_type): """ :return: - iterator yieling Diff instances that match the given change_type + iterator yielding Diff instances that match the given change_type :param change_type: Member of DiffIndex.change_type, namely: @@ -347,7 +347,7 @@ class Diff(object): msg += '\n---' # END diff info - # Python2 sillyness: have to assure we convert our likely to be unicode object to a string with the + # Python2 silliness: have to assure we convert our likely to be unicode object to a string with the # right encoding. Otherwise it tries to convert it using ascii, which may fail ungracefully res = h + msg if not PY3: @@ -427,7 +427,7 @@ class Diff(object): b_path = cls._pick_best_path(b_path, rename_to, b_path_fallback) # Our only means to find the actual text is to see what has not been matched by our regex, - # and then retro-actively assin it to our index + # and then retro-actively assign it to our index if previous_header is not None: index[-1].diff = text[previous_header.end():header.start()] # end assign actual diff @@ -480,7 +480,7 @@ class Diff(object): rename_from = None rename_to = None - # NOTE: We cannot conclude from the existance of a blob to change type + # NOTE: We cannot conclude from the existence of a blob to change type # as diffs with the working do not have blobs yet if change_type == 'D': b_blob_id = None @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -""" Module containing all exceptions thrown througout the git package, """ +""" Module containing all exceptions thrown throughout the git package, """ from gitdb.exc import * # NOQA @UnusedWildImport from git.compat import UnicodeMixin, safe_decode, string_types diff --git a/git/index/base.py b/git/index/base.py index ac2d3019..c93a999b 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -144,7 +144,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): self._deserialize(stream) finally: lfd.rollback() - # The handles will be closed on desctruction + # The handles will be closed on destruction # END read from default index on demand else: super(IndexFile, self)._set_cache_(attr) @@ -880,7 +880,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): def move(self, items, skip_errors=False, **kwargs): """Rename/move the items, whereas the last item is considered the destination of the move operation. If the destination is a file, the first item ( of two ) - must be a file as well. If the destination is a directory, it may be preceeded + must be a file as well. If the destination is a directory, it may be preceded by one or more directories or files. The working tree will be affected in non-bare repositories. @@ -890,7 +890,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): for reference. :param skip_errors: If True, errors such as ones resulting from missing source files will - be skpped. + be skipped. :param kwargs: Additional arguments you would like to pass to git-mv, such as dry_run or force. @@ -899,7 +899,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): A list of pairs, containing the source file moved as well as its actual destination. Relative to the repository root. - :raise ValueErorr: If only one item was given + :raise ValueError: If only one item was given GitCommandError: If git could not handle your request""" args = list() if skip_errors: @@ -995,7 +995,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): prior and after a file has been checked out :param kwargs: - Additional arguments to be pasesd to git-checkout-index + Additional arguments to be passed to git-checkout-index :return: iterable yielding paths to files which have been checked out and are @@ -1223,7 +1223,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): cur_val = kwargs.get('R', False) kwargs['R'] = not cur_val return other.diff(self.Index, paths, create_patch, **kwargs) - # END diff against other item handlin + # END diff against other item handling # if other is not None here, something is wrong if other is not None: diff --git a/git/index/fun.py b/git/index/fun.py index 7a7593fe..ddb04138 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -355,7 +355,7 @@ def aggressive_tree_merge(odb, tree_shas): out_append(_tree_entry_to_baseindexentry(theirs, 3)) # END theirs changed # else: - # theirs didnt change + # theirs didn't change # pass # END handle theirs # END handle ours diff --git a/git/index/util.py b/git/index/util.py index ce798851..5d72a9cc 100644 --- a/git/index/util.py +++ b/git/index/util.py @@ -72,7 +72,7 @@ def default_index(func): raise AssertionError( "Cannot call %r on indices that do not represent the default git index" % func.__name__) return func(self, *args, **kwargs) - # END wrpaper method + # END wrapper method return check_default_index diff --git a/git/objects/base.py b/git/objects/base.py index 0b849960..8027299c 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -127,7 +127,7 @@ class IndexObject(Object): SubModule objects""" __slots__ = ("path", "mode") - # for compatability with iterable lists + # for compatibility with iterable lists _id_attribute_ = 'path' def __init__(self, repo, binsha, mode=None, path=None): @@ -137,7 +137,7 @@ class IndexObject(Object): :param binsha: 20 byte sha1 :param mode: is the stat compatible file mode as int, use the stat module - to evaluate the infomration + to evaluate the information :param path: is the path to the file in the file system, relative to the git repository root, i.e. file.ext or folder/other.ext @@ -165,7 +165,7 @@ class IndexObject(Object): % (attr, type(self).__name__)) else: super(IndexObject, self)._set_cache_(attr) - # END hanlde slot attribute + # END handle slot attribute @property def name(self): diff --git a/git/objects/commit.py b/git/objects/commit.py index 1534c552..e537c0bb 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -163,7 +163,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): """Count the number of commits reachable from this commit :param paths: - is an optinal path or a list of paths restricting the return value + is an optional path or a list of paths restricting the return value to commits actually containing the paths :param kwargs: @@ -192,7 +192,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): :param repo: is the Repo :param rev: revision specifier, see git-rev-parse for viable options :param paths: - is an optinal path or list of paths, if set only Commits that include the path + is an optional path or list of paths, if set only Commits that include the path or paths will be considered :param kwargs: optional keyword arguments to git rev-list where diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index 9bb563d7..2e265a54 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -69,7 +69,7 @@ UPDWKTREE = UpdateProgress.UPDWKTREE # IndexObject comes via util module, its a 'hacky' fix thanks to pythons import # mechanism which cause plenty of trouble of the only reason for packages and -# modules is refactoring - subpackages shoudn't depend on parent packages +# modules is refactoring - subpackages shouldn't depend on parent packages class Submodule(IndexObject, Iterable, Traversable): """Implements access to a git submodule. They are special in that their sha @@ -137,7 +137,7 @@ class Submodule(IndexObject, Iterable, Traversable): return type(self).list_items(item.module()) except InvalidGitRepositoryError: return list() - # END handle intermeditate items + # END handle intermediate items @classmethod def _need_gitfile_submodules(cls, git): @@ -178,7 +178,7 @@ class Submodule(IndexObject, Iterable, Traversable): except ValueError: # We are most likely in an empty repository, so the HEAD doesn't point to a valid ref pass - # end hanlde parent_commit + # end handle parent_commit if not repo.bare and parent_matches_head: fp_module = os.path.join(repo.working_tree_dir, cls.k_modules_file) @@ -221,7 +221,7 @@ class Submodule(IndexObject, Iterable, Traversable): pc = self.parent_commit except ValueError: pc = None - # end hande empty parent repository + # end handle empty parent repository parser = self._config_parser(self.repo, pc, read_only) parser.set_submodule(self) return SectionConstraint(parser, sm_section(self.name)) @@ -940,7 +940,7 @@ class Submodule(IndexObject, Iterable, Traversable): # END handle checking mode # update our sha, it could have changed - # If check is False, we might see a parent-commit that doens't even contain the submodule anymore. + # If check is False, we might see a parent-commit that doesn't even contain the submodule anymore. # in that case, mark our sha as being NULL try: self.binsha = pctree[self.path].binsha diff --git a/git/objects/tree.py b/git/objects/tree.py index 4f853f92..18c0add1 100644 --- a/git/objects/tree.py +++ b/git/objects/tree.py @@ -77,7 +77,7 @@ class TreeModifier(object): """A utility class providing methods to alter the underlying cache in a list-like fashion. - Once all adjustments are complete, the _cache, which really is a refernce to + Once all adjustments are complete, the _cache, which really is a reference to the cache of a tree, will be sorted. Assuring it will be in a serializable state""" __slots__ = '_cache' @@ -294,7 +294,7 @@ class Tree(IndexObject, diff.Diffable, util.Traversable, util.Serializable): return self._map_id_to_type[info[1] >> 12](self.repo, info[0], info[1], join_path(self.path, info[2])) if isinstance(item, string_types): - # compatability + # compatibility return self.join(item) # END index is basestring @@ -308,7 +308,7 @@ class Tree(IndexObject, diff.Diffable, util.Traversable, util.Serializable): # END compare sha # END for each entry # END handle item is index object - # compatability + # compatibility # treat item as repo-relative path path = self.path diff --git a/git/objects/util.py b/git/objects/util.py index cbb9fe3c..5c085aec 100644 --- a/git/objects/util.py +++ b/git/objects/util.py @@ -270,7 +270,7 @@ class Traversable(object): def traverse(self, predicate=lambda i, d: True, prune=lambda i, d: False, depth=-1, branch_first=True, visit_once=True, ignore_self=1, as_edge=False): - """:return: iterator yieling of items found when traversing self + """:return: iterator yielding of items found when traversing self :param predicate: f(i,d) returns False if item i at depth d should not be included in the result @@ -282,7 +282,7 @@ class Traversable(object): define at which level the iteration should not go deeper if -1, there is no limit if 0, you would effectively only get self, the root of the iteration - i.e. if 1, you would only get the first level of predessessors/successors + i.e. if 1, you would only get the first level of predecessors/successors :param branch_first: if True, items will be returned branch first, otherwise depth first @@ -298,7 +298,7 @@ class Traversable(object): :param as_edge: if True, return a pair of items, first being the source, second the - destinatination, i.e. tuple(src, dest) with the edge spanning from + destination, i.e. tuple(src, dest) with the edge spanning from source to destination""" visited = set() stack = Deque() @@ -348,7 +348,7 @@ class Serializable(object): def _serialize(self, stream): """Serialize the data of this object into the given data stream - :note: a serialized object would ``_deserialize`` into the same objet + :note: a serialized object would ``_deserialize`` into the same object :param stream: a file-like object :return: self""" raise NotImplementedError("To be implemented in subclass") diff --git a/git/refs/head.py b/git/refs/head.py index a1d8ab46..9a9a8596 100644 --- a/git/refs/head.py +++ b/git/refs/head.py @@ -216,8 +216,7 @@ class Head(Reference): else: return self.repo.active_branch - #{ Configruation - + #{ Configuration def _config_parser(self, read_only): if read_only: parser = self.repo.config_reader() @@ -235,7 +234,7 @@ class Head(Reference): def config_writer(self): """ - :return: A configuration writer instance with read-and write acccess + :return: A configuration writer instance with read-and write access to options of this head""" return self._config_parser(read_only=False) diff --git a/git/refs/reference.py b/git/refs/reference.py index cc99dc26..734ed8b9 100644 --- a/git/refs/reference.py +++ b/git/refs/reference.py @@ -20,7 +20,7 @@ def require_remote_ref_path(func): # END wrapper wrapper.__name__ = func.__name__ return wrapper -#}END utilites +#}END utilities class Reference(SymbolicReference, LazyMixin, Iterable): diff --git a/git/refs/remote.py b/git/refs/remote.py index 1f256b75..b5318bc3 100644 --- a/git/refs/remote.py +++ b/git/refs/remote.py @@ -28,7 +28,7 @@ class RemoteReference(Head): """Delete the given remote references :note: - kwargs are given for compatability with the base class method as we + kwargs are given for comparability with the base class method as we should not narrow the signature.""" repo.git.branch("-d", "-r", *refs) # the official deletion method will ignore remote symbolic refs - these diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index ebaff8ca..00fb2fcd 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -111,7 +111,7 @@ class SymbolicReference(object): return # END no packed-refs file handling # NOTE: Had try-finally block around here to close the fp, - # but some python version woudn't allow yields within that. + # but some python version wouldn't allow yields within that. # I believe files are closing themselves on destruction, so it is # alright. @@ -143,7 +143,7 @@ class SymbolicReference(object): except (OSError, IOError): # Probably we are just packed, find our entry in the packed refs file # NOTE: We are not a symbolic ref if we are in a packed file, as these - # are excluded explictly + # are excluded explicitly for sha, path in cls._iter_packed_refs(repo): if path != ref_path: continue @@ -264,7 +264,7 @@ class SymbolicReference(object): symbolic one. :param ref: SymbolicReference instance, Object instance or refspec string - Only if the ref is a SymbolicRef instance, we will point to it. Everthing + Only if the ref is a SymbolicRef instance, we will point to it. Everything else is dereferenced to obtain the actual object. :param logmsg: If set to a string, the message will be used in the reflog. Otherwise, a reflog entry is not written for the changed reference. @@ -454,7 +454,7 @@ class SymbolicReference(object): fd.writelines(l.encode(defenc) for l in new_lines) except (OSError, IOError): - pass # it didnt exist at all + pass # it didn't exist at all # delete the reflog reflog_path = RefLog.path(cls(repo, full_ref_path)) @@ -625,7 +625,7 @@ class SymbolicReference(object): git.SymbolicReference[], each of them is guaranteed to be a symbolic ref which is not detached and pointing to a valid ref - List is lexigraphically sorted + List is lexicographically sorted The returned objects represent actual subclasses, such as Head or TagReference""" return (r for r in cls._iter_items(repo, common_path) if r.__class__ == SymbolicReference or not r.is_detached) diff --git a/git/refs/tag.py b/git/refs/tag.py index 11dbab97..cf41d971 100644 --- a/git/refs/tag.py +++ b/git/refs/tag.py @@ -9,7 +9,7 @@ class TagReference(Reference): ,a tag object or any other object. In the latter case additional information, like the signature or the tag-creator, is available. - This tag object will always point to a commit object, but may carray additional + This tag object will always point to a commit object, but may carry additional information in a tag object:: tagref = TagReference.list_items(repo)[0] diff --git a/git/remote.py b/git/remote.py index 71585a41..7cb7fd59 100644 --- a/git/remote.py +++ b/git/remote.py @@ -273,7 +273,7 @@ class FetchInfo(object): flags |= cls._flag_map[control_character] except KeyError: raise ValueError("Control character %r unknown as parsed from line %r" % (control_character, line)) - # END control char exception hanlding + # END control char exception handling # parse operation string for more info - makes no sense for symbolic refs, but we parse it anyway old_commit = None @@ -535,7 +535,7 @@ class Remote(LazyMixin, Iterable): The IterableList is prefixed, hence the 'origin' must be omitted. See 'refs' property for an example. - To make things more complicated, it can be possble for the list to include + To make things more complicated, it can be possible for the list to include other kinds of references, for example, tag references, if these are stale as well. This is a fix for the issue described here: https://github.com/gitpython-developers/GitPython/issues/260 @@ -554,7 +554,7 @@ class Remote(LazyMixin, Iterable): else: fqhn = "%s/%s" % (RemoteReference._common_path_default, ref_name) out_refs.append(RemoteReference(self.repo, fqhn)) - # end special case handlin + # end special case handling # END for each line return out_refs @@ -778,7 +778,7 @@ class Remote(LazyMixin, Iterable): Can take one of many value types: * None to discard progress information - * A function (callable) that is called with the progress infomation. + * A function (callable) that is called with the progress information. Signature: ``progress(op_code, cur_count, max_count=None, message='')``. @@ -823,7 +823,7 @@ class Remote(LazyMixin, Iterable): :return: GitConfigParser compatible object able to write options for this remote. :note: You can only own one writer at a time - delete it to release the - configuration file and make it useable by others. + configuration file and make it usable by others. To assure consistent results, you should only query options through the writer. Once you are done writing, you are free to use the config reader diff --git a/git/repo/fun.py b/git/repo/fun.py index 320eb1c8..4d852cfe 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -250,8 +250,8 @@ def rev_parse(repo, rev): # empty output types don't require any specific type, its just about dereferencing tags if output_type and obj.type != output_type: - raise ValueError("Could not accomodate requested object type %r, got %s" % (output_type, obj.type)) - # END verify ouput type + raise ValueError("Could not accommodate requested object type %r, got %s" % (output_type, obj.type)) + # END verify output type start = end + 1 # skip brace parsed_to = start @@ -280,7 +280,7 @@ def rev_parse(repo, rev): # END number parsing only if non-blob mode parsed_to = start - # handle hiererarchy walk + # handle hierarchy walk try: if token == "~": obj = to_commit(obj) diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py index c5a003ea..b009a9cd 100644 --- a/git/test/lib/helper.py +++ b/git/test/lib/helper.py @@ -192,7 +192,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref): and should be an inetd service that serves tempdir.gettempdir() and all directories in it. - The following scetch demonstrates this:: + The following sketch demonstrates this:: rorepo ---<bare clone>---> rw_remote_repo ---<clone>---> rw_repo The test case needs to support the following signature:: diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py index b57b9b71..ed82e4dd 100644 --- a/git/test/performance/lib.py +++ b/git/test/performance/lib.py @@ -16,7 +16,7 @@ from git import ( ) from git.util import rmtree -#{ Invvariants +#{ Invariants k_env_git_repo = "GIT_PYTHON_TEST_GIT_REPO_BASE" #} END invariants diff --git a/git/util.py b/git/util.py index d00de1e4..3dd12d39 100644 --- a/git/util.py +++ b/git/util.py @@ -232,7 +232,7 @@ class RemoteProgress(object): sub_lines = line.split('\r') failed_lines = list() for sline in sub_lines: - # find esacpe characters and cut them away - regex will not work with + # find escape characters and cut them away - regex will not work with # them as they are non-ascii. As git might expect a tty, it will send them last_valid_index = None for i, c in enumerate(reversed(sline)): @@ -527,7 +527,7 @@ class IndexFileSHA1Writer(object): """Wrapper around a file-like object that remembers the SHA1 of the data written to it. It will write a sha when the stream is closed - or if the asked for explicitly usign write_sha. + or if the asked for explicitly using write_sha. Only useful to the indexfile @@ -657,7 +657,7 @@ class BlockingLockFile(LockFile): super(BlockingLockFile, self)._obtain_lock() except IOError: # synity check: if the directory leading to the lockfile is not - # readable anymore, raise an execption + # readable anymore, raise an exception curtime = time.time() if not os.path.isdir(os.path.dirname(self._lock_file_path())): msg = "Directory containing the lockfile %r was not readable anymore after waiting %g seconds" % ( @@ -701,7 +701,7 @@ class IterableList(list): self._prefix = prefix def __contains__(self, attr): - # first try identy match for performance + # first try identity match for performance rval = list.__contains__(self, attr) if rval: return rval |