# # # add_file "templates/branchtags.html" # content [451943bb4f5dc413e1b737dfc03944f5664b8f87] # # patch "ChangeLog" # from [ce79bf0303b91f326b21b80791f11feccb73ef20] # to [e7a6f81345bf185e0d0d0881a81e5f3ace88d5f5] # # patch "templates/branch.html" # from [9b84a47baffe133624433db124e92d70a206bb6a] # to [6df3371a0bff5d5135c6e18c04666af87aa9c4db] # # patch "viewmtn.py" # from [da0bd746711f7fba726db7f95b5218b89e49ac2c] # to [cef0b97f618b6e532dc9e70b41142e19e27ea5ec] # ============================================================ --- templates/branchtags.html 451943bb4f5dc413e1b737dfc03944f5664b8f87 +++ templates/branchtags.html 451943bb4f5dc413e1b737dfc03944f5664b8f87 @@ -0,0 +1,40 @@ +#extends branch + +#def body +

+A tag marks a particular revision that is in some way significant. +A common use of tags is to mark public release of a piece of software. +To view a particular tag, select it from the list below. +

+ +

+All tags on this branch are listed below. +

+ + + +#for tag in $tags + + + + + + +#end for +
TagSigned byBranchesAge
+ #filter Filter + $link($tag).html() + #end filter + + $tag.author + + #filter Filter + #for branch in $tag.branches + $link($branch).html()
+ #end for + #end filter +
+ $revision_ago($tag.revision) +
+ +#end def ============================================================ --- ChangeLog ce79bf0303b91f326b21b80791f11feccb73ef20 +++ ChangeLog e7a6f81345bf185e0d0d0881a81e5f3ace88d5f5 @@ -1,3 +1,8 @@ +2007-03-30 Grahame Bowland + + * add new branch tag view, showing all tags + on a given branch + 2007-03-29 Grahame Bowland * fix bug in revised get_last_changes; don't ============================================================ --- templates/branch.html 9b84a47baffe133624433db124e92d70a206bb6a +++ templates/branch.html 6df3371a0bff5d5135c6e18c04666af87aa9c4db @@ -1,9 +1,10 @@ #extends base #def extramenu Branch $branch.name: Changes | -Head revision +Head revision | +Tags #end def #def rssheaders ============================================================ --- viewmtn.py da0bd746711f7fba726db7f95b5218b89e49ac2c +++ viewmtn.py cef0b97f618b6e532dc9e70b41142e19e27ea5ec @@ -333,9 +333,20 @@ class Tags: renderer.render('about.html', page_title="About") class Tags: - def GET(self): + def GET(self, restrict_branch=None): # otherwise we couldn't use automate again.. tags = map(None, ops.tags()) + restrict_branch = mtn.Branch(restrict_branch) + if restrict_branch != None: + def tag_in(tag): + for branch in tag.branches: + if branch.name == restrict_branch.name: + return tag + return None + tags = filter(tag_in, tags) + template_file = "branchtags.html" + else: + template_file = "tags.html" tags.sort(lambda t1, t2: cmp(t1.name, t2.name)) def revision_ago(rev): rv = "" @@ -344,7 +355,7 @@ class Tags: revdate = common.parse_timecert(cert[7]) rv = common.ago(revdate) return rv - renderer.render('tags.html', page_title="Tags", tags=tags, revision_ago=revision_ago) + renderer.render(template_file, page_title="Tags", tags=tags, revision_ago=revision_ago, branch=restrict_branch) class Help: def GET(self): @@ -1076,6 +1087,7 @@ urls = ( r'/branch/changes/([^/]+)()()', 'HTMLBranchChanges', r'/branch/changes/(.*)/from/(\d+)/to/(\d+)/rss', 'RSSBranchChanges', r'/branch/changes/([^/]+)()()/rss', 'RSSBranchChanges', + r'/branch/tags/([^/]+)', 'Tags', # let's make it possible to access any function on the head revision # through this proxy method; it'll return a redirect to the head revision