[PATCH] files: fix invalid links to Last Revision

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun May 31 07:56:52 EDT 2015


# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1433073387 -7200
#      Sun May 31 13:56:27 2015 +0200
# Node ID 19d7fb2450cf730a5b5555f5bc0c69a79c67c1cd
# Parent  baedf806eb0be5eb3b5acb019319d57b8ba24c14
files: fix invalid links to Last Revision

The Last Revision column of the file browser linked to URLs with the
changeset as:
   r14:abcdef0123
which is not a valid changeset id. Instead, use .raw_id.

diff --git a/kallithea/templates/files/files_browser.html b/kallithea/templates/files/files_browser.html
--- a/kallithea/templates/files/files_browser.html
+++ b/kallithea/templates/files/files_browser.html
@@ -90,7 +90,7 @@
                      </td>
                      <td>
                          %if node.is_file():
-                             <a title="${h.tooltip(node.last_changeset.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset)}" class="tooltip revision-link">${h.show_id(node.last_changeset)}</a>
+                             <a title="${h.tooltip(node.last_changeset.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset.raw_id)}" class="tooltip revision-link">${h.show_id(node.last_changeset)}</a>
                          %endif
                      </td>
                      <td>


More information about the kallithea-general mailing list