aboutsummaryrefslogtreecommitdiff
path: root/lib/git/objects/tag.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-03-04 09:06:03 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-03-04 09:06:03 +0100
commit72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b (patch)
tree09e28dfbad901791a8306e890f69a6b737d20a03 /lib/git/objects/tag.py
parent4956c1e618bfcfeef86c6ea90c22dd04ca81b9db (diff)
downloadGitPython-72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b.tar.gz
GitPython-72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b.zip
Converted all tabs to 4 space characters each to comply with pep8
Diffstat (limited to 'lib/git/objects/tag.py')
-rw-r--r--lib/git/objects/tag.py124
1 files changed, 62 insertions, 62 deletions
diff --git a/lib/git/objects/tag.py b/lib/git/objects/tag.py
index c329edf7..e880bbe5 100644
--- a/lib/git/objects/tag.py
+++ b/lib/git/objects/tag.py
@@ -10,66 +10,66 @@ import base
import utils
class TagObject(base.Object):
- """
- Non-Lightweight tag carrying additional information about an object we are pointing
- to.
- """
- type = "tag"
- __slots__ = ( "object", "tag", "tagger", "tagged_date", "message" )
-
- def __init__(self, repo, sha, object=None, tag=None,
- tagger=None, tagged_date=None, message=None):
- """
- Initialize a tag object with additional data
-
- ``repo``
- repository this object is located in
-
- ``sha``
- SHA1 or ref suitable for git-rev-parse
-
- ``object``
- Object instance of object we are pointing to
-
- ``tag``
- name of this tag
-
- ``tagger``
- Actor identifying the tagger
-
- ``tagged_date`` : int_seconds_since_epoch
- is the DateTime of the tag creation - use time.gmtime to convert
- it into a different format
- """
- super(TagObject, self).__init__(repo, sha )
- self._set_self_from_args_(locals())
-
- def _set_cache_(self, attr):
- """
- Cache all our attributes at once
- """
- if attr in TagObject.__slots__:
- lines = self.data.splitlines()
-
- obj, hexsha = lines[0].split(" ") # object <hexsha>
- type_token, type_name = lines[1].split(" ") # type <type_name>
- self.object = utils.get_object_type_by_name(type_name)(self.repo, hexsha)
-
- self.tag = lines[2][4:] # tag <tag name>
-
- tagger_info = lines[3][7:]# tagger <actor> <date>
- self.tagger, self.tagged_date = utils.parse_actor_and_date(tagger_info)
-
- # line 4 empty - it could mark the beginning of the next header
- # in csse there really is no message, it would not exist. Otherwise
- # a newline separates header from message
- if len(lines) > 5:
- self.message = "\n".join(lines[5:])
- else:
- self.message = ''
- # END check our attributes
- else:
- super(TagObject, self)._set_cache_(attr)
-
-
+ """
+ Non-Lightweight tag carrying additional information about an object we are pointing
+ to.
+ """
+ type = "tag"
+ __slots__ = ( "object", "tag", "tagger", "tagged_date", "message" )
+
+ def __init__(self, repo, sha, object=None, tag=None,
+ tagger=None, tagged_date=None, message=None):
+ """
+ Initialize a tag object with additional data
+
+ ``repo``
+ repository this object is located in
+
+ ``sha``
+ SHA1 or ref suitable for git-rev-parse
+
+ ``object``
+ Object instance of object we are pointing to
+
+ ``tag``
+ name of this tag
+
+ ``tagger``
+ Actor identifying the tagger
+
+ ``tagged_date`` : int_seconds_since_epoch
+ is the DateTime of the tag creation - use time.gmtime to convert
+ it into a different format
+ """
+ super(TagObject, self).__init__(repo, sha )
+ self._set_self_from_args_(locals())
+
+ def _set_cache_(self, attr):
+ """
+ Cache all our attributes at once
+ """
+ if attr in TagObject.__slots__:
+ lines = self.data.splitlines()
+
+ obj, hexsha = lines[0].split(" ") # object <hexsha>
+ type_token, type_name = lines[1].split(" ") # type <type_name>
+ self.object = utils.get_object_type_by_name(type_name)(self.repo, hexsha)
+
+ self.tag = lines[2][4:] # tag <tag name>
+
+ tagger_info = lines[3][7:]# tagger <actor> <date>
+ self.tagger, self.tagged_date = utils.parse_actor_and_date(tagger_info)
+
+ # line 4 empty - it could mark the beginning of the next header
+ # in csse there really is no message, it would not exist. Otherwise
+ # a newline separates header from message
+ if len(lines) > 5:
+ self.message = "\n".join(lines[5:])
+ else:
+ self.message = ''
+ # END check our attributes
+ else:
+ super(TagObject, self)._set_cache_(attr)
+
+