Changeset - ff5caafa26dc
[Not reviewed]
default
0 5 0
Mads Kiilerich - 8 years ago 2017-08-28 05:25:40
mads@kiilerich.com
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.
5 files changed with 21 insertions and 24 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/feed.py
Show inline comments
 
@@ -86,9 +86,8 @@ class FeedController(BaseRepoController)
 
        #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)
kallithea/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -50,6 +50,10 @@ class GitChangeset(BaseChangeset):
 
        self._paths = {}
 

	
 
    @LazyProperty
 
    def bookmarks(self):
 
        return ()
 

	
 
    @LazyProperty
 
    def message(self):
 
        return safe_unicode(self._commit.message)
 

	
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -152,13 +152,11 @@ ${self.repo_context_bar('changelog', c.f
 
                                            ${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))}
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
@@ -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))}
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -73,13 +73,11 @@ ${self.repo_context_bar('changelog', c.c
 
                        <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}">
0 comments (0 inline, 0 general)