From 58d692e2a1d7e3894dbed68efbcf7166d6ec3fb7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 15 Oct 2009 10:33:13 +0200 Subject: All times are not stored as time_struct, but as simple int to consume less memory time imports cleaned up and mostly removed as they were not required (anymore) --- lib/git/objects/tag.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/git/objects/tag.py') diff --git a/lib/git/objects/tag.py b/lib/git/objects/tag.py index ecf6349d..f54d4b64 100644 --- a/lib/git/objects/tag.py +++ b/lib/git/objects/tag.py @@ -7,8 +7,7 @@ Module containing all object based types. """ import base -import commit -from utils import get_object_type_by_name +import utils class TagObject(base.Object): """ @@ -38,8 +37,9 @@ class TagObject(base.Object): ``tagger`` Actor identifying the tagger - ``tagged_date`` : (tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec, tm_wday, tm_yday, tm_isdst) - is the DateTime of the tag creation + ``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, id ) self._set_self_from_args_(locals()) @@ -53,12 +53,12 @@ class TagObject(base.Object): obj, hexsha = lines[0].split(" ") # object type_token, type_name = lines[1].split(" ") # type - self.object = get_object_type_by_name(type_name)(self.repo, hexsha) + self.object = utils.get_object_type_by_name(type_name)(self.repo, hexsha) self.tag = lines[2][4:] # tag tagger_info = lines[3][7:]# tagger - self.tagger, self.tagged_date = commit.Commit._actor(tagger_info) + self.tagger, self.tagged_date = utils.parse_actor_and_date(tagger_info) # line 4 empty - check git source to figure out purpose self.message = "\n".join(lines[5:]) -- cgit v1.2.3