diff options
author | Michael Trier <mtrier@gmail.com> | 2010-03-03 23:46:23 -0500 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2010-03-03 23:46:23 -0500 |
commit | e3e2c8c14b861b4d4865a9574e812ef9f2609771 (patch) | |
tree | c71c7da3843389ea3b7041a0200d7abe3b0e580d /lib/git | |
parent | acb0fa8b94ef421ad60c8507b634759a472cd56c (diff) | |
download | gitpython-e3e2c8c14b861b4d4865a9574e812ef9f2609771.tar.gz |
Corrected a bunch of whitespace that makes some folks crazy. Added Sebastian to the AUTHORS file.
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/__init__.py | 2 | ||||
-rw-r--r-- | lib/git/actor.py | 6 | ||||
-rw-r--r-- | lib/git/blob.py | 10 | ||||
-rw-r--r-- | lib/git/cmd.py | 26 | ||||
-rw-r--r-- | lib/git/commit.py | 26 | ||||
-rw-r--r-- | lib/git/diff.py | 2 | ||||
-rw-r--r-- | lib/git/errors.py | 2 | ||||
-rw-r--r-- | lib/git/head.py | 10 | ||||
-rw-r--r-- | lib/git/lazy.py | 2 | ||||
-rw-r--r-- | lib/git/repo.py | 28 | ||||
-rw-r--r-- | lib/git/stats.py | 34 | ||||
-rw-r--r-- | lib/git/tag.py | 10 | ||||
-rw-r--r-- | lib/git/tree.py | 2 | ||||
-rw-r--r-- | lib/git/utils.py | 2 |
14 files changed, 81 insertions, 81 deletions
diff --git a/lib/git/__init__.py b/lib/git/__init__.py index 28d14d0c..393fb8a4 100644 --- a/lib/git/__init__.py +++ b/lib/git/__init__.py @@ -1,5 +1,5 @@ # __init__.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/lib/git/actor.py b/lib/git/actor.py index bc1a4479..de85a202 100644 --- a/lib/git/actor.py +++ b/lib/git/actor.py @@ -1,5 +1,5 @@ # actor.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -7,8 +7,8 @@ import re class Actor(object): - """Actors hold information about a person acting on the repository. They - can be committers and authors or anything with a name and an email as + """Actors hold information about a person acting on the repository. They + can be committers and authors or anything with a name and an email as mentioned in the git log entries.""" def __init__(self, name, email): self.name = name diff --git a/lib/git/blob.py b/lib/git/blob.py index 82a41f73..e63037d4 100644 --- a/lib/git/blob.py +++ b/lib/git/blob.py @@ -1,5 +1,5 @@ # blob.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -49,7 +49,7 @@ class Blob(object): Returns int - + NOTE The size will be cached after the first access """ @@ -64,7 +64,7 @@ class Blob(object): Returns str - + NOTE The data will be cached after the first access. """ @@ -78,7 +78,7 @@ class Blob(object): Returns str - + NOTE Defaults to 'text/plain' in case the actual file type is unknown. """ @@ -102,7 +102,7 @@ class Blob(object): Returns list: [git.Commit, list: [<line>]] - A list of tuples associating a Commit object with a list of lines that + A list of tuples associating a Commit object with a list of lines that changed within the given commit. The Commit objects will be given in order of appearance. """ diff --git a/lib/git/cmd.py b/lib/git/cmd.py index aef53350..98314191 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -1,5 +1,5 @@ # cmd.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -23,24 +23,24 @@ if sys.platform == 'win32': class Git(object): """ The Git class manages communication with the Git binary. - + It provides a convenient interface to calling the Git binary, such as in:: - + g = Git( git_dir ) g.init() # calls 'git init' program rval = g.ls_files() # calls 'git ls-files' program - + ``Debugging`` - Set the GIT_PYTHON_TRACE environment variable print each invocation + Set the GIT_PYTHON_TRACE environment variable print each invocation of the command to stdout. Set its value to 'full' to see details about the returned values. """ def __init__(self, git_dir=None): """ Initialize this instance with: - + ``git_dir`` - Git directory we should work in. If None, we always work in the current + Git directory we should work in. If None, we always work in the current directory as returned by os.getcwd() """ super(Git, self).__init__() @@ -48,7 +48,7 @@ class Git(object): def __getattr__(self, name): """ - A convenience method as it allows to call the command as if it was + A convenience method as it allows to call the command as if it was an object. Returns Callable object that will execute call _call_process with your arguments. @@ -99,15 +99,15 @@ class Git(object): Whether to avoid stripping off trailing whitespace. Returns:: - + str(output) # extended_output = False (Default) tuple(int(status), str(stdout), str(stderr)) # extended_output = True - + Raise - GitCommandError - + GitCommandError + NOTE - If you add additional keyword arguments to the signature of this method, + If you add additional keyword arguments to the signature of this method, you must update the execute_kwargs tuple housed in this module. """ if GIT_PYTHON_TRACE and not GIT_PYTHON_TRACE == 'full': diff --git a/lib/git/commit.py b/lib/git/commit.py index 1cb863ca..591fb38b 100644 --- a/lib/git/commit.py +++ b/lib/git/commit.py @@ -1,5 +1,5 @@ # commit.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -16,16 +16,16 @@ import stats class Commit(LazyMixin): """ Wraps a git Commit object. - - This class will act lazily on some of its attributes and will query the + + This class will act lazily on some of its attributes and will query the value on demand only if it involves calling the git binary. """ def __init__(self, repo, id, tree=None, author=None, authored_date=None, committer=None, committed_date=None, message=None, parents=None): """ - Instantiate a new Commit. All keyword arguments taking None as default will - be implicitly set if id names a valid sha. - + Instantiate a new Commit. All keyword arguments taking None as default will + be implicitly set if id names a valid sha. + The parameter documentation indicates the type of the argument after a colon ':'. ``id`` @@ -75,7 +75,7 @@ class Commit(LazyMixin): def __bake__(self): """ - Called by LazyMixin superclass when the first uninitialized member needs + Called by LazyMixin superclass when the first uninitialized member needs to be set as it is queried. """ temp = Commit.find_all(self.repo, self.id, max_count=1)[0] @@ -133,7 +133,7 @@ class Commit(LazyMixin): is the ref from which to begin (SHA1 or name) ``path`` - is an optinal path, if set only Commits that include the path + is an optinal path, if set only Commits that include the path will be considered ``kwargs`` @@ -210,9 +210,9 @@ class Commit(LazyMixin): Returns git.Diff[]:: - + between tree and the index if only a is given - between two trees if a and b are given and are commits + between two trees if a and b are given and are commits """ paths = paths or [] @@ -234,7 +234,7 @@ class Commit(LazyMixin): """ Returns git.Diff[] - Diffs between this commit and its first parent or all changes if this + Diffs between this commit and its first parent or all changes if this commit is the first commit and has no parent. """ if not self.parents: @@ -252,9 +252,9 @@ class Commit(LazyMixin): @property def stats(self): """ - Create a git stat from changes between this commit and its first parent + Create a git stat from changes between this commit and its first parent or from all changes done if this is the very first commit. - + Return git.Stats """ diff --git a/lib/git/diff.py b/lib/git/diff.py index 0216e061..6c4ba65c 100644 --- a/lib/git/diff.py +++ b/lib/git/diff.py @@ -1,5 +1,5 @@ # diff.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/lib/git/errors.py b/lib/git/errors.py index 2632d5f3..86debaac 100644 --- a/lib/git/errors.py +++ b/lib/git/errors.py @@ -1,5 +1,5 @@ # errors.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/lib/git/head.py b/lib/git/head.py index 639cee40..f2e9e3f2 100644 --- a/lib/git/head.py +++ b/lib/git/head.py @@ -1,5 +1,5 @@ # head.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -16,10 +16,10 @@ class Head(object): >>> repo = Repo("/path/to/repo") >>> head = repo.heads[0] - >>> head.name + >>> head.name 'master' - >>> head.commit + >>> head.commit <git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"> >>> head.commit.id @@ -53,7 +53,7 @@ class Head(object): Returns git.Head[] - + List is sorted by committerdate """ @@ -96,7 +96,7 @@ class Head(object): is the formatted head information Format:: - + name: [a-zA-Z_/]+ <null byte> id: [0-9A-Fa-f]{40} diff --git a/lib/git/lazy.py b/lib/git/lazy.py index 5e470181..59c5f062 100644 --- a/lib/git/lazy.py +++ b/lib/git/lazy.py @@ -1,5 +1,5 @@ # lazy.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/lib/git/repo.py b/lib/git/repo.py index ae9b94c3..3490499c 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -1,5 +1,5 @@ # repo.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -19,7 +19,7 @@ from tree import Tree class Repo(object): """ - Represents a git repository and allows you to query references, + Represents a git repository and allows you to query references, gather commit information, generate diffs, create and clone repositories query the log. """ @@ -125,7 +125,7 @@ class Repo(object): is the maximum number of commits to return (default 10) ``skip`` - is the number of commits to skip (default 0) which will effectively + is the number of commits to skip (default 0) which will effectively move your commit-window by the given number. Returns @@ -162,7 +162,7 @@ class Repo(object): ``path`` is an optinal path to limit the returned commits to. - + ``since`` is a string represeting a date/time @@ -215,7 +215,7 @@ class Repo(object): """ Returns a list of commits that is in ``other_repo`` but not in self - Returns + Returns git.Commit[] """ repo_refs = self.git.rev_list(ref, '--').strip().splitlines() @@ -256,7 +256,7 @@ class Repo(object): def log(self, commit='master', path=None, **kwargs): """ The Commit for a treeish, and all commits leading to it. - + ``kwargs`` keyword arguments specifying flags to be used in git-log command, i.e.: max_count=1 to limit the amount of commits returned @@ -283,7 +283,7 @@ class Repo(object): ``paths`` is an optional list of file paths on which to restrict the diff - + Returns ``str`` """ @@ -452,20 +452,20 @@ class Repo(object): Sets the alternates ``alts`` - is the array of string paths representing the alternates at which + is the array of string paths representing the alternates at which git should look for objects, i.e. /home/user/repo/.git/objects Raises NoSuchPathError - + Note The method does not check for the existance of the paths in alts as the caller is responsible. - + Returns None """ - alternates_path = os.path.join(self.path, 'objects', 'info', 'alternates') + alternates_path = os.path.join(self.path, 'objects', 'info', 'alternates') if not alts: if os.path.isfile(alternates_path): os.remove(alternates_path) @@ -475,7 +475,7 @@ class Repo(object): f.write("\n".join(alts)) finally: f.close() - # END file handling + # END file handling # END alts handling alternates = property(_get_alternates, _set_alternates, doc="Retrieve a list of alternates paths or set a list paths to be used as alternates") @@ -489,8 +489,8 @@ class Repo(object): ``True``, if the index has any uncommitted changes, otherwise ``False`` - NOTE - Working tree changes that have not been staged will not be detected ! + NOTE + Working tree changes that have not been staged will not be detected ! """ if self.bare: # Bare repositories with no associated working directory are diff --git a/lib/git/stats.py b/lib/git/stats.py index 307e2f2f..74f0aed9 100644 --- a/lib/git/stats.py +++ b/lib/git/stats.py @@ -1,35 +1,35 @@ # stats.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php class Stats(object): """ - Represents stat information as presented by git at the end of a merge. It is + Represents stat information as presented by git at the end of a merge. It is created from the output of a diff operation. - + ``Example``:: - + c = Commit( sha1 ) s = c.stats s.total # full-stat-dict s.files # dict( filepath : stat-dict ) - + ``stat-dict`` - + A dictionary with the following keys and values:: - + deletions = number of deleted lines as int insertions = number of inserted lines as int lines = total number of lines changed as int, or deletions + insertions - + ``full-stat-dict`` - + In addition to the items in the stat-dict, it features additional information:: - + files = number of changed files as int - + """ def __init__(self, repo, total, files): self.repo = repo @@ -38,12 +38,12 @@ class Stats(object): @classmethod def list_from_string(cls, repo, text): - """ - Create a Stat object from output retrieved by git-diff. - - Returns - git.Stat - """ + """ + Create a Stat object from output retrieved by git-diff. + + Returns + git.Stat + """ hsh = {'total': {'insertions': 0, 'deletions': 0, 'lines': 0, 'files': 0}, 'files': {}} for line in text.splitlines(): (raw_insertions, raw_deletions, filename) = line.split("\t") diff --git a/lib/git/tag.py b/lib/git/tag.py index 8413ce73..8ec2f8ae 100644 --- a/lib/git/tag.py +++ b/lib/git/tag.py @@ -1,5 +1,5 @@ # tag.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -29,12 +29,12 @@ class Tag(object): is the Repo ``kwargs`` - Additional options given as keyword arguments, will be passed + Additional options given as keyword arguments, will be passed to git-for-each-ref Returns ``git.Tag[]`` - + List is sorted by committerdate """ options = {'sort': "committerdate", @@ -75,11 +75,11 @@ class Tag(object): is the formatted tag information Format:: - + name: [a-zA-Z_/]+ <null byte> id: [0-9A-Fa-f]{40} - + Returns git.Tag """ diff --git a/lib/git/tree.py b/lib/git/tree.py index cfb0881c..aaeca828 100644 --- a/lib/git/tree.py +++ b/lib/git/tree.py @@ -1,5 +1,5 @@ # tree.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/lib/git/utils.py b/lib/git/utils.py index 8425a728..a7d7543c 100644 --- a/lib/git/utils.py +++ b/lib/git/utils.py @@ -1,5 +1,5 @@ # utils.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php |