Mercurial > kallithea
changeset 4273:edc266f04d5f
allover: branchtags should link to the branch in the changelog as it says, not to the current revision
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 18 Jul 2014 18:44:45 +0200 |
parents | f8f180cbe68d |
children | ce7c4addc2ae |
files | kallithea/templates/branches/branches_data.html kallithea/templates/changeset/changeset.html kallithea/tests/functional/test_branches.py |
diffstat | 3 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/branches/branches_data.html Wed Jun 12 12:23:20 2013 +0200 +++ b/kallithea/templates/branches/branches_data.html Fri Jul 18 18:44:45 2014 +0200 @@ -18,8 +18,9 @@ <td>${branch[0]}</td> <td> <span class="logtags"> - <span class="branchtag">${h.link_to(branch[0], - h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> + <span class="branchtag"> + ${h.link_to(branch[0],h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))} + </span> </span> </td> <td>${branch[1]._timestamp}</td> @@ -44,8 +45,9 @@ <td>${branch[0]}</td> <td> <span class="logtags"> - <span class="branchtag">${h.link_to(branch[0]+' [closed]', - h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))}</span> + <span class="branchtag"> + ${h.link_to(branch[0]+' [closed]',h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))} + </span> </span> </td> <td>${branch[1]._timestamp}</td>
--- a/kallithea/templates/changeset/changeset.html Wed Jun 12 12:23:20 2013 +0200 +++ b/kallithea/templates/changeset/changeset.html Fri Jul 18 18:44:45 2014 +0200 @@ -103,7 +103,7 @@ %if c.changeset.branch: <span class="branchtag" title="${_('Branch %s') % c.changeset.branch}"> - ${h.link_to(c.changeset.branch,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} + ${h.link_to(c.changeset.branch,h.url('changelog_home',repo_name=c.repo_name,branch=c.changeset.branch))} </span> %endif </span>
--- a/kallithea/tests/functional/test_branches.py Wed Jun 12 12:23:20 2013 +0200 +++ b/kallithea/tests/functional/test_branches.py Fri Jul 18 18:44:45 2014 +0200 @@ -7,14 +7,14 @@ self.log_user() response = self.app.get(url(controller='branches', action='index', repo_name=HG_REPO)) - response.mustcontain("""<a href="/%s/changeset/96507bd11ecc815ebc6270fdf6db110928c09c1e">default</a>""" % HG_REPO) + response.mustcontain("""<a href="/%s/changelog?branch=default">default</a>""" % HG_REPO) # closed branches - response.mustcontain("""<a href="/%s/changeset/95ca6417ec0de6ac3bd19b336d7b608f27b88711">git [closed]</a><""" % HG_REPO) - response.mustcontain("""<a href="/%s/changeset/0dd5fd7b37a4eea4dd9b662af63cee743b4ccce2">web [closed]</a>""" % HG_REPO) + response.mustcontain("""<a href="/%s/changelog?branch=git">git [closed]</a>""" % HG_REPO) + response.mustcontain("""<a href="/%s/changelog?branch=web">web [closed]</a>""" % HG_REPO) def test_index_git(self): self.log_user() response = self.app.get(url(controller='branches', action='index', repo_name=GIT_REPO)) - response.mustcontain("""<a href="/%s/changeset/5f2c6ee195929b0be80749243c18121c9864a3b3">master</a>""" % GIT_REPO) + response.mustcontain("""<a href="/%s/changelog?branch=master">master</a>""" % GIT_REPO)