Changeset - 7879d8d88672
[Not reviewed]
default
0 5 0
Mads Kiilerich - 11 years ago 2014-07-04 14:12:06
madski@unity3d.com
pull requests: show changeset comment and status flags in the changelog for PRs
5 files changed with 21 insertions and 7 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -312,6 +312,7 @@ class ChangesetController(BaseRepoContro
 
                return render('changeset/changeset.html')
 
            else:
 
                c.cs_ranges_org = None
 
                c.cs_comments = {}
 
                revs = [ctx.revision for ctx in reversed(c.cs_ranges)]
 
                c.jsdata = json.dumps(graph_data(c.db_repo_scm_instance, revs))
 
                return render('changeset/changeset_range.html')
kallithea/controllers/compare.py
Show inline comments
 
@@ -222,15 +222,13 @@ class CompareController(BaseRepoControll
 
        c.cs_ranges, c.cs_ranges_org, c.ancestor = self._get_changesets(
 
            org_repo.scm_instance.alias, org_repo.scm_instance, c.org_rev,
 
            other_repo.scm_instance, c.other_rev)
 
        c.statuses = c.db_repo.statuses(
 
            [x.raw_id for x in c.cs_ranges])
 
        raw_ids = [x.raw_id for x in c.cs_ranges]
 
        c.cs_comments = other_repo.get_comments(raw_ids)
 
        c.statuses = other_repo.statuses(raw_ids)
 

	
 
        revs = [ctx.revision for ctx in reversed(c.cs_ranges)]
 
        c.jsdata = json.dumps(graph_data(c.other_repo.scm_instance, revs))
 

	
 
        c.statuses = c.db_repo.statuses([x.raw_id for x in
 
                                                   c.cs_ranges])
 

	
 
        if partial:
 
            return render('compare/compare_cs.html')
 
        if merge and c.ancestor:
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -204,7 +204,9 @@ class PullrequestsController(BaseRepoCon
 
        revs = [ctx.revision for ctx in reversed(c.cs_ranges)]
 
        c.jsdata = json.dumps(graph_data(org_scm_instance, revs))
 

	
 
        c.statuses = c.org_repo.statuses([x.raw_id for x in c.cs_ranges])
 
        raw_ids = [x.raw_id for x in c.cs_ranges]
 
        c.cs_comments = c.org_repo.get_comments(raw_ids)
 
        c.statuses = c.org_repo.statuses(raw_ids)
 

	
 
        ignore_whitespace = request.GET.get('ignorews') == '1'
 
        line_context = request.GET.get('context', 3)
kallithea/public/css/style.css
Show inline comments
 
@@ -2657,6 +2657,8 @@ BIN_FILENODE = 6
 
    height: 41px;
 
}
 

	
 
#pull_request_overview .comments-container,
 
#changeset_compare_view_content .comments-container,
 
#graph_content .comments-container,
 
#shortlog_data .comments-container,
 
#graph_content .logtags {
 
@@ -2761,13 +2763,14 @@ BIN_FILENODE = 6
 
    padding: 3px 0;
 
}
 

	
 
#pull_request_overview .comments-cnt a,
 
#changeset_compare_view_content .comments-cnt a,
 
#graph_content .comments-cnt a,
 
#shortlog_data .comments-cnt a {
 
    background-image: url('../images/icons/comments.png');
 
    background-repeat: no-repeat;
 
    background-position: 100% 50%;
 
    padding: 5px 0;
 
    padding-right: 20px;
 
}
 

	
 
.right .changes {
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -25,6 +25,16 @@
 
                <img height="16" width="16" src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cs.raw_id][0])}" />
 
            </div>
 
          %endif
 
          %if c.cs_comments.get(cs.raw_id):
 
              <div class="comments-container">
 
                  <div class="comments-cnt" title="${_('Changeset has comments')}">
 
                      <a href="${h.url('changeset_home',repo_name=c.other_repo.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.cs_comments[cs.raw_id][0].comment_id)}">
 
                          ${len(c.cs_comments[cs.raw_id])}
 
                          <i class="icon-comment-alt icon-comment-colored"></i>
 
                      </a>
 
                  </div>
 
              </div>
 
          %endif
 
        </td>
 
        <td style="width: 140px"><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td>
 
        <td><div class="gravatar" commit_id="${cs.raw_id}"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}" height="14" width="14"/></div></td>
0 comments (0 inline, 0 general)