[PATCH v2] pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire
patrickdepinguin at gmail.com
Sun May 31 07:38:59 EDT 2015
# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1431287504 -7200
# Sun May 10 21:51:44 2015 +0200
# Node ID baedf806eb0be5eb3b5acb019319d57b8ba24c14
# Parent 2c1ae0b188ae5f5fde6369f76803a1170592b90d
pullrequest/compare: add logical changeset index to clarify the order
Is the parent-most changeset in a changeset the one at the top or at the
bottom? When the revision numbers are not shown, it is not obvious to
determine this.
This commit adds a logical changeset index to the commit list in a
pullrequest or compare view. The index starts at 1 (the parent-most commit)
and has no relation whatsoever with the commit hash or revision number.
diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css
--- a/kallithea/public/css/style.css
+++ b/kallithea/public/css/style.css
@@ -2307,6 +2307,14 @@ h3.files_location {
margin-right: -3px;
}
+.changeset-logical-index {
+ color: #666666;
+ font-style: italic;
+ font-size: 85%;
+ padding-right: 0.5em;
+ text-align: right;
+}
+
.changeset_hash {
color: #000000;
}
diff --git a/kallithea/templates/compare/compare_cs.html b/kallithea/templates/compare/compare_cs.html
--- a/kallithea/templates/compare/compare_cs.html
+++ b/kallithea/templates/compare/compare_cs.html
@@ -36,6 +36,21 @@
</div>
%endif
</td>
+ <td class="changeset-logical-index">
+ <%
+ num_cs = len(c.cs_ranges)
+ index = num_cs - cnt
+ if index == 1:
+ tooltip_note = ' (first, parent-most changeset)'
+ elif index == num_cs:
+ tooltip_note = ' (last, child-most changeset)'
+ else:
+ tooltip_note = ''
+ %>
+ <span class="tooltip" title="Order of changeset in this list: ${index}/${num_cs}${tooltip_note}">
+ ${index}
+ </span>
+ </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}">${h.gravatar(h.email_or_none(cs.author), size=14)}</div></td>
<td><div class="author">${h.person(cs.author)}</div></td>
More information about the kallithea-general
mailing list