# HG changeset patch # User Mads Kiilerich # Date 2017-08-28 05:25:40 # Node ID ff5caafa26dc551a58e3c770ac811afe80cbbc62 # Parent 651e37ed51c641e7966695785496c69b3b1186dc 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. diff --git a/kallithea/controllers/feed.py b/kallithea/controllers/feed.py --- a/kallithea/controllers/feed.py +++ b/kallithea/controllers/feed.py @@ -86,9 +86,8 @@ class FeedController(BaseRepoController) #branches, tags, bookmarks if cs.branch: desc_msg.append('branch: %s
' % cs.branch) - if h.is_hg(c.db_repo_scm_instance): - for book in cs.bookmarks: - desc_msg.append('bookmark: %s
' % book) + for book in cs.bookmarks: + desc_msg.append('bookmark: %s
' % book) for tag in cs.tags: desc_msg.append('tag: %s
' % tag) diff_processor, changes = self.__changes(cs) diff --git a/kallithea/lib/vcs/backends/git/changeset.py b/kallithea/lib/vcs/backends/git/changeset.py --- a/kallithea/lib/vcs/backends/git/changeset.py +++ b/kallithea/lib/vcs/backends/git/changeset.py @@ -50,6 +50,10 @@ class GitChangeset(BaseChangeset): self._paths = {} @LazyProperty + def bookmarks(self): + return () + + @LazyProperty def message(self): return safe_unicode(self._commit.message) diff --git a/kallithea/templates/changelog/changelog.html b/kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html +++ b/kallithea/templates/changelog/changelog.html @@ -152,13 +152,11 @@ ${self.repo_context_bar('changelog', c.f ${cs.phase} %endif - %if h.is_hg(c.db_repo_scm_instance): - %for book in cs.bookmarks: - - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} - - %endfor - %endif + %for book in cs.bookmarks: + + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + + %endfor %for tag in cs.tags: ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} diff --git a/kallithea/templates/changelog/changelog_summary_data.html b/kallithea/templates/changelog/changelog_summary_data.html --- a/kallithea/templates/changelog/changelog_summary_data.html +++ b/kallithea/templates/changelog/changelog_summary_data.html @@ -48,13 +48,11 @@ ${h.person(cs.author)} - %if h.is_hg(c.db_repo_scm_instance): - %for book in cs.bookmarks: - - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} - - %endfor - %endif + %for book in cs.bookmarks: + + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + + %endfor %for tag in cs.tags: ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} diff --git a/kallithea/templates/changeset/changeset.html b/kallithea/templates/changeset/changeset.html --- a/kallithea/templates/changeset/changeset.html +++ b/kallithea/templates/changeset/changeset.html @@ -73,13 +73,11 @@ ${self.repo_context_bar('changelog', c.c ${_('Merge')} %endif - %if h.is_hg(c.db_repo_scm_instance): - %for book in c.changeset.bookmarks: - - ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} - - %endfor - %endif + %for book in c.changeset.bookmarks: + + ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} + + %endfor %for tag in c.changeset.tags: