Mercurial > kallithea
changeset 6843:ff5caafa26dc
vcs: let Git changesets return an empty set of bookmarks and drop vcs check before iterating bookmarks
Git repositories already had an empty set of bookmarks. Do the same for Git changesets.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 28 Aug 2017 05:25:40 +0200 |
parents | 651e37ed51c6 |
children | cb3bdf436473 |
files | kallithea/controllers/feed.py kallithea/lib/vcs/backends/git/changeset.py kallithea/templates/changelog/changelog.html kallithea/templates/changelog/changelog_summary_data.html kallithea/templates/changeset/changeset.html |
diffstat | 5 files changed, 21 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/feed.py Thu Nov 03 20:03:03 2016 +0100 +++ b/kallithea/controllers/feed.py Mon Aug 28 05:25:40 2017 +0200 @@ -86,9 +86,8 @@ #branches, tags, bookmarks if cs.branch: desc_msg.append('branch: %s<br/>' % cs.branch) - if h.is_hg(c.db_repo_scm_instance): - for book in cs.bookmarks: - desc_msg.append('bookmark: %s<br/>' % book) + for book in cs.bookmarks: + desc_msg.append('bookmark: %s<br/>' % book) for tag in cs.tags: desc_msg.append('tag: %s<br/>' % tag) diff_processor, changes = self.__changes(cs)
--- a/kallithea/lib/vcs/backends/git/changeset.py Thu Nov 03 20:03:03 2016 +0100 +++ b/kallithea/lib/vcs/backends/git/changeset.py Mon Aug 28 05:25:40 2017 +0200 @@ -50,6 +50,10 @@ self._paths = {} @LazyProperty + def bookmarks(self): + return () + + @LazyProperty def message(self): return safe_unicode(self._commit.message)
--- a/kallithea/templates/changelog/changelog.html Thu Nov 03 20:03:03 2016 +0100 +++ b/kallithea/templates/changelog/changelog.html Mon Aug 28 05:25:40 2017 +0200 @@ -152,13 +152,11 @@ ${cs.phase} </span> %endif - %if h.is_hg(c.db_repo_scm_instance): - %for book in cs.bookmarks: - <span class="booktag" title="${_('Bookmark %s') % book}"> - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} - </span> - %endfor - %endif + %for book in cs.bookmarks: + <span class="booktag" title="${_('Bookmark %s') % book}"> + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + </span> + %endfor %for tag in cs.tags: <span class="tagtag" title="${_('Tag %s') % tag}"> ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
--- a/kallithea/templates/changelog/changelog_summary_data.html Thu Nov 03 20:03:03 2016 +0100 +++ b/kallithea/templates/changelog/changelog_summary_data.html Mon Aug 28 05:25:40 2017 +0200 @@ -48,13 +48,11 @@ </td> <td title="${cs.author}">${h.person(cs.author)}</td> <td> - %if h.is_hg(c.db_repo_scm_instance): - %for book in cs.bookmarks: - <span class="booktag" title="${_('Bookmark %s') % book}"> - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} - </span> - %endfor - %endif + %for book in cs.bookmarks: + <span class="booktag" title="${_('Bookmark %s') % book}"> + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + </span> + %endfor %for tag in cs.tags: <span class="tagtag" title="${_('Tag %s') % tag}"> ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
--- a/kallithea/templates/changeset/changeset.html Thu Nov 03 20:03:03 2016 +0100 +++ b/kallithea/templates/changeset/changeset.html Mon Aug 28 05:25:40 2017 +0200 @@ -73,13 +73,11 @@ <span class="mergetag">${_('Merge')}</span> %endif - %if h.is_hg(c.db_repo_scm_instance): - %for book in c.changeset.bookmarks: - <span class="booktag" title="${_('Bookmark %s') % book}"> - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} - </span> - %endfor - %endif + %for book in c.changeset.bookmarks: + <span class="booktag" title="${_('Bookmark %s') % book}"> + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} + </span> + %endfor %for tag in c.changeset.tags: <span class="tagtag" title="${_('Tag %s') % tag}">