Show More
@@ -49,7 +49,6 b' class CompareController(BaseRepoControll' | |||
|
49 | 49 | def __before__(self): |
|
50 | 50 | super(CompareController, self).__before__() |
|
51 | 51 | |
|
52 | ||
|
53 | 52 | def _get_discovery(self, org_repo, org_ref, other_repo, other_ref): |
|
54 | 53 | from mercurial import discovery |
|
55 | 54 | other = org_repo._repo |
@@ -119,6 +118,10 b' class CompareController(BaseRepoControll' | |||
|
119 | 118 | other_ref, |
|
120 | 119 | discovery_data) |
|
121 | 120 | |
|
121 | c.statuses = c.rhodecode_db_repo.statuses([x.raw_id for x in | |
|
122 | c.cs_ranges]) | |
|
123 | ||
|
124 | ||
|
122 | 125 | c.org_ref = org_ref[1] |
|
123 | 126 | c.other_ref = other_ref[1] |
|
124 | 127 | # diff needs to have swapped org with other to generate proper diff |
@@ -129,9 +132,8 b' class CompareController(BaseRepoControll' | |||
|
129 | 132 | |
|
130 | 133 | c.files = [] |
|
131 | 134 | c.changes = {} |
|
132 | # sort Added first then Modified last Deleted files | |
|
133 | sorter = lambda info: {'A': 0, 'M': 1, 'D': 2}.get(info['operation']) | |
|
134 | for f in sorted(_parsed, key=sorter): | |
|
135 | ||
|
136 | for f in _parsed: | |
|
135 | 137 | fid = h.FID('', f['filename']) |
|
136 | 138 | c.files.append([fid, f['operation'], f['filename'], f['stats']]) |
|
137 | 139 | diff = diff_processor.as_html(enable_comments=False, diff_lines=[f]) |
@@ -38,14 +38,14 b'' | |||
|
38 | 38 | %for cnt, cs in enumerate(c.cs_ranges): |
|
39 | 39 | <tr> |
|
40 | 40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> |
|
41 | <td> | |
|
42 | %if cs.raw_id in c.statuses: | |
|
43 | <div title="${c.statuses[cs.raw_id][1]}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cs.raw_id][0])}" /></div> | |
|
44 | %endif | |
|
45 | </td> | |
|
41 | 46 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
42 | 47 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
43 | 48 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
44 | <td> | |
|
45 | %if hasattr(c,'statuses') and c.statuses: | |
|
46 | <div title="${_('Changeset status')}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> | |
|
47 | %endif | |
|
48 | </td> | |
|
49 | 49 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
50 | 50 | </tr> |
|
51 | 51 | %endfor |
General Comments 0
You need to be logged in to leave comments.
Login now