# HG changeset patch # User Sascha Teichmann # Date 1284128287 0 # Node ID a8f77807d710676e82d582cbcc6add68c80f2d5a # Parent d8012571f9e1f4b83de6e3c607348e283286c680 sawmill: create links for tag builds diff -r d8012571f9e1 -r a8f77807d710 contrib/sawmill/web/details.py --- a/contrib/sawmill/web/details.py Fri Sep 10 10:46:50 2010 +0000 +++ b/contrib/sawmill/web/details.py Fri Sep 10 14:18:07 2010 +0000 @@ -43,6 +43,7 @@ self.start = None self.stop = None self.logs = None + self.tags = None def check_loaded(self): if not self.loaded: @@ -56,6 +57,7 @@ if key == 'status': self.status = value elif key == 'start': self.start = _create_time(value) elif key == 'stop': self.stop = _create_time(value) + elif key == 'tags': self.tags = value finally: f.close() self.loaded = True @@ -72,6 +74,10 @@ self.check_loaded() return self.stop + def get_tags(self): + self.check_loaded() + return self.tags + def log_path(self, log): return "%s/tracks/%s/pkg/%s/log/%s" % ( self.treepkg, self.track, self.revision, log) @@ -92,13 +98,14 @@ build_start = property(get_build_start) build_stop = property(get_build_stop) build_logs = property(get_build_logs) + build_tags = property(get_tags) def __scan_track_items(treepkg, path): items = [] tracks_path = os.path.join(path, "tracks") - if os.path.isdir(track_path): + if os.path.isdir(tracks_path): for track in os.listdir(tracks_path): track_path = os.path.join(tracks_path, track) if not os.path.isdir(track_path): continue diff -r d8012571f9e1 -r a8f77807d710 contrib/sawmill/web/templates/details.html --- a/contrib/sawmill/web/templates/details.html Fri Sep 10 10:46:50 2010 +0000 +++ b/contrib/sawmill/web/templates/details.html Fri Sep 10 14:18:07 2010 +0000 @@ -103,6 +103,11 @@ if not b_start: return -1 return cmp(a_start, b_start) +def create_tags_link(tag_url): + return quoteattr(tag_url.replace( + "svn://anonsvn.kde.org/home/kde", + "http://websvn.kde.org")) + track_items = sorted(track_items, cmp=sort_by_start, reverse=True) last_date = None @@ -134,7 +139,22 @@ <%= STATUS2MSG.get(track_item.build_status, 'error') %> <%= nn(track_item.track) %> - <%= nn(track_item.revision) %> + +<% + tags = track_item.build_tags + if tags: + # a tag +%> + ><%= nn(track_item.revision) %> +<% + else: + # not a tag +%> + <%= nn(track_item.revision) %> +<% + # end if tags +%> + <%= pretty_time(track_item.build_start) %> <%= pretty_time(track_item.build_stop) %>