diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-16 11:48:20 +0200 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-16 11:48:20 +0200 |
| commit | 05d2687afcc78cd192714ee3d71fdf36a37d110f (patch) | |
| tree | 3e3760e5b46095458cf75446330ba2fc25fa23e5 /lib/git/objects/tag.py | |
| parent | 6226720b0e6a5f7cb9223fc50363def487831315 (diff) | |
| parent | f2df1f56cccab13d5c92abbc6b18be725e7b4833 (diff) | |
| download | GitPython-05d2687afcc78cd192714ee3d71fdf36a37d110f.tar.gz GitPython-05d2687afcc78cd192714ee3d71fdf36a37d110f.zip | |
Merging latest improvements including a revamped Repo interface before more changes are to be done on the way diffing is handled
Merge branch 'improvements'
* improvements:
Improved archive function by allowing it to directly write to an output stream - previously it would cache everything to memory and try to provide zipping functionality itself
repo: made init and clone methods less specific, previously they wanted to do it 'barely' only. New method names closely follow the default git command names
repo.commit_delta_base: removed
Object can now create objects of the proper type in case one attempts to create an object directly - this feature is used in several places now, allowing for additional type-checking
repo: removed commits_between but added a note about how this can be achieved using the iter_commits method; reorganized methods within the type as a start for more interface changes
Added Commit.iter_parents to iterate all parents
repo: removed a few methods because of redundancy or because it will be obsolete once the interface overhaul is finished. This commit is just intermediate
All times are not stored as time_struct, but as simple int to consume less memory
Diffstat (limited to 'lib/git/objects/tag.py')
| -rw-r--r-- | lib/git/objects/tag.py | 12 |
1 files changed, 6 insertions, 6 deletions
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 <hexsha> type_token, type_name = lines[1].split(" ") # type <type_name> - 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 <tag name> tagger_info = lines[3][7:]# tagger <actor> <date> - 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:]) |
