diff options
author | Steve Frécinaux <code@istique.net> | 2008-09-16 08:08:47 +0200 |
---|---|---|
committer | Steve Frécinaux <code@istique.net> | 2008-09-17 08:08:09 +0200 |
commit | b00f3689aa19938c10576580fbfc9243d9f3866c (patch) | |
tree | c9575089d08f9c1f701c7fdb5305b38142131975 /lib/git | |
parent | 5de63b40dbb8fef7f2f46e42732081ef6d0d8866 (diff) | |
download | gitpython-b00f3689aa19938c10576580fbfc9243d9f3866c.tar.gz |
Replace GitPython with git in repr() outputs.
The imported module is called git (as in "import git"), so it's less
confusing to do so than to call everything GitPython.something.
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/actor.py | 2 | ||||
-rw-r--r-- | lib/git/blob.py | 6 | ||||
-rw-r--r-- | lib/git/commit.py | 10 | ||||
-rw-r--r-- | lib/git/head.py | 12 | ||||
-rw-r--r-- | lib/git/repo.py | 32 | ||||
-rw-r--r-- | lib/git/tag.py | 10 | ||||
-rw-r--r-- | lib/git/tree.py | 10 |
7 files changed, 41 insertions, 41 deletions
diff --git a/lib/git/actor.py b/lib/git/actor.py index afd94016..901e52af 100644 --- a/lib/git/actor.py +++ b/lib/git/actor.py @@ -15,7 +15,7 @@ class Actor(object): return self.name def __repr__(self): - return '<GitPython.Actor "%s <%s>">' % (self.name, self.email) + return '<git.Actor "%s <%s>">' % (self.name, self.email) @classmethod def from_string(cls, string): diff --git a/lib/git/blob.py b/lib/git/blob.py index 80d237d7..a79cd81c 100644 --- a/lib/git/blob.py +++ b/lib/git/blob.py @@ -31,7 +31,7 @@ class Blob(object): is the file name Returns - GitPython.Blob + git.Blob """ self.repo = repo self.id = id @@ -87,7 +87,7 @@ class Blob(object): The blame information for the given file at the given commit Returns - list: [GitPython.Commit, list: [<line>]] + list: [git.Commit, list: [<line>]] """ data = repo.git.blame(commit, '--', file, p=True) commits = {} @@ -141,4 +141,4 @@ class Blob(object): return blames def __repr__(self): - return '<GitPython.Blob "%s">' % self.id + return '<git.Blob "%s">' % self.id diff --git a/lib/git/commit.py b/lib/git/commit.py index e92293e4..8b7bdfa8 100644 --- a/lib/git/commit.py +++ b/lib/git/commit.py @@ -47,7 +47,7 @@ class Commit(LazyMixin): is the list of the parents of the commit Returns - GitPython.Commit + git.Commit """ LazyMixin.__init__(self) @@ -113,7 +113,7 @@ class Commit(LazyMixin): ``skip`` is the number of commits to skip Returns - GitPython.Commit[] + git.Commit[] """ options = {'pretty': 'raw'} options.update(kwargs) @@ -133,7 +133,7 @@ class Commit(LazyMixin): is the text output from the git command (raw format) Returns - GitPython.Commit[] + git.Commit[] """ lines = [l for l in text.splitlines() if l.strip()] @@ -180,7 +180,7 @@ class Commit(LazyMixin): is a list of paths to limit the diff. Returns - GitPython.Diff[] + git.Diff[] """ paths = paths or [] @@ -229,7 +229,7 @@ class Commit(LazyMixin): return self.id def __repr__(self): - return '<GitPython.Commit "%s">' % self.id + return '<git.Commit "%s">' % self.id @classmethod def actor(cls, line): diff --git a/lib/git/head.py b/lib/git/head.py index 96d35010..4386aa98 100644 --- a/lib/git/head.py +++ b/lib/git/head.py @@ -20,7 +20,7 @@ class Head(object): 'master' >>> head.commit - <GitPython.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"> + <git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"> >>> head.commit.id '1c09f116cbc2cb4100fb6935bb162daa4723f455' @@ -37,7 +37,7 @@ class Head(object): is the Commit that the head points to Returns - GitPython.Head + git.Head """ self.name = name self.commit = commit @@ -54,7 +54,7 @@ class Head(object): is a dict of options Returns - GitPython.Head[] + git.Head[] """ options = {'sort': "committerdate", @@ -75,7 +75,7 @@ class Head(object): is the text output from the git command Returns - GitPython.Head[] + git.Head[] """ heads = [] @@ -101,7 +101,7 @@ class Head(object): id: [0-9A-Fa-f]{40} Returns - GitPython.Head + git.Head """ full_name, ids = line.split("\x00") name = full_name.split("/")[-1] @@ -109,4 +109,4 @@ class Head(object): return Head(name, c) def __repr__(self): - return '<GitPython.Head "%s">' % self.name + return '<git.Head "%s">' % self.name diff --git a/lib/git/repo.py b/lib/git/repo.py index fdfb7928..a3874259 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -31,7 +31,7 @@ class Repo(object): repo = Repo("/Users/mtrier/Development/git-python.git") Returns - ``GitPython.Repo`` + ``git.Repo`` """ epath = os.path.abspath(os.path.expanduser(path or os.getcwd())) @@ -83,7 +83,7 @@ class Repo(object): this repo Returns - ``GitPython.Head[]`` + ``git.Head[]`` """ return Head.find_all(self) @@ -96,7 +96,7 @@ class Repo(object): A list of ``Tag`` objects that are available in this repo Returns - ``GitPython.Tag[]`` + ``git.Tag[]`` """ return Tag.find_all(self) @@ -114,7 +114,7 @@ class Repo(object): is the number of commits to skip (default 0) Returns - ``GitPython.Commit[]`` + ``git.Commit[]`` """ options = {'max_count': max_count, 'skip': skip} @@ -133,7 +133,7 @@ class Repo(object): is the branch/commit name of the older item Returns - ``GitPython.Commit[]`` + ``git.Commit[]`` """ return Commit.find_all(self, "%s..%s" % (frm, to)).reverse() @@ -149,7 +149,7 @@ class Repo(object): is a string represeting a date/time Returns - ``GitPython.Commit[]`` + ``git.Commit[]`` """ options = {'since': since} @@ -175,7 +175,7 @@ class Repo(object): is the SHA1 identifier of the commit Returns - GitPython.Commit + git.Commit """ options = {'max_count': 1} @@ -190,7 +190,7 @@ class Repo(object): Returns a list of commits that is in ``other_repo`` but not in self Returns - ``GitPython.Commit[]`` + ``git.Commit[]`` """ repo_refs = self.git.rev_list(ref).strip().splitlines() other_repo_refs = other_repo.git.rev_list(other_ref).strip().splitlines() @@ -211,7 +211,7 @@ class Repo(object): Returns - ``GitPython.Tree`` + ``git.Tree`` """ return Tree(self, id=treeish) @@ -223,7 +223,7 @@ class Repo(object): is the SHA1 id of the blob Returns - ``GitPython.Blob`` + ``git.Blob`` """ return Blob(self, id=id) @@ -232,7 +232,7 @@ class Repo(object): The commit log for a treeish Returns - ``GitPython.Commit[]`` + ``git.Commit[]`` """ options = {'pretty': 'raw'} options.update(kwargs) @@ -263,7 +263,7 @@ class Repo(object): ``commit`` is the commit name/id Returns - ``GitPython.Diff[]`` + ``git.Diff[]`` """ return Commit.diff(self, commit) @@ -284,10 +284,10 @@ class Repo(object): Examples:: - GitPython.Repo.init_bare('/var/git/myrepo.git') + git.Repo.init_bare('/var/git/myrepo.git') Returns - ``GitPython.Repo`` (the newly created repo) + ``git.Repo`` (the newly created repo) """ if mkdir and not os.path.exists(path): @@ -309,7 +309,7 @@ class Repo(object): is any additional options to the git clone command Returns - ``GitPython.Repo`` (the newly forked repo) + ``git.Repo`` (the newly forked repo) """ options = {'bare': True} options.update(kwargs) @@ -467,4 +467,4 @@ class Repo(object): return branch def __repr__(self): - return '<GitPython.Repo "%s">' % self.path + return '<git.Repo "%s">' % self.path diff --git a/lib/git/tag.py b/lib/git/tag.py index f54b7661..e780d2ba 100644 --- a/lib/git/tag.py +++ b/lib/git/tag.py @@ -18,7 +18,7 @@ class Tag(object): is the Commit that the head points to Returns - ``GitPython.Tag`` + ``git.Tag`` """ self.name = name self.commit = commit @@ -35,7 +35,7 @@ class Tag(object): is a dict of options Returns - ``GitPython.Tag[]`` + ``git.Tag[]`` """ options = {'sort': "committerdate", 'format': "%(refname)%00%(objectname)"} @@ -56,7 +56,7 @@ class Tag(object): is the text output from the git command Returns - ``GitPython.Tag[]`` + ``git.Tag[]`` """ tags = [] for line in text.splitlines(): @@ -80,7 +80,7 @@ class Tag(object): id: [0-9A-Fa-f]{40} Returns - ``GitPython.Tag`` + ``git.Tag`` """ full_name, ids = line.split("\x00") name = full_name.split("/")[-1] @@ -88,4 +88,4 @@ class Tag(object): return Tag(name, commit) def __repr__(self): - return '<GitPython.Tag "%s">' % self.name + return '<git.Tag "%s">' % self.name diff --git a/lib/git/tree.py b/lib/git/tree.py index dbd78ac4..d4587573 100644 --- a/lib/git/tree.py +++ b/lib/git/tree.py @@ -42,7 +42,7 @@ class Tree(LazyMixin): is the single line containing the items data in `git ls-tree` format Returns - ``GitPython.Blob`` or ``GitPython.Tree`` + ``git.Blob`` or ``git.Tree`` """ try: mode, typ, id, name = text.expandtabs(1).split(" ", 4) @@ -65,12 +65,12 @@ class Tree(LazyMixin): Examples:: >>> Repo('/path/to/python-git').tree/'lib' - <GitPython.Tree "6cc23ee138be09ff8c28b07162720018b244e95e"> + <git.Tree "6cc23ee138be09ff8c28b07162720018b244e95e"> >>> Repo('/path/to/python-git').tree/'README.txt' - <GitPython.Blob "8b1e02c0fb554eed2ce2ef737a68bb369d7527df"> + <git.Blob "8b1e02c0fb554eed2ce2ef737a68bb369d7527df"> Returns - ``GitPython.Blob`` or ``GitPython.Tree`` or ``None`` if not found + ``git.Blob`` or ``git.Tree`` or ``None`` if not found """ return self.get(file) @@ -79,7 +79,7 @@ class Tree(LazyMixin): os.path.basename(self.name) def __repr__(self): - return '<GitPython.Tree "%s">' % self.id + return '<git.Tree "%s">' % self.id # Implement the basics of the dict protocol: # directories/trees can be seen as object dicts. |