[PATCH 6 of 6] templates/changeset: display precursor changesets

Andrew Shadura andrew at shadura.me
Tue Jul 28 11:02:42 UTC 2015


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1406668456 18000
#      Tue Jul 29 16:14:16 2014 -0500
# Node ID adcb76686f212995283b4078b3685533e3f70135
# Parent  bb64b9c238e026bf84287851f22e2977575d0dc5
templates/changeset: display precursor changesets

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
@@ -144,6 +144,20 @@
                      </div>
                      % endif
 
+                     % if hasattr(c.changeset, 'precursors') and c.changeset.precursors:
+                     <div class='precursors'>
+                       <span class='precursors_header'>${_('Preceded by:')} </span>
+                       % for i, s in enumerate(c.changeset.precursors):
+                           <%
+                           comma = ""
+                           if i != len(c.changeset.precursors)-1:
+                             comma = ", "
+                           %>
+                           <a class="precursors_hash" href="${h.url('changeset_home',repo_name=c.repo_name, revision=s)}">${s}</a>${comma}
+                       % endfor
+                     </div>
+                     % endif
+
                      <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
                 </div>
             </div>


More information about the kallithea-general mailing list