Skip to content

Commit ffb5b48

Browse files
harrisricvladak
authored andcommitted
Change history page to use the display revision property for the visible revision but retain the actual revision for the links
1 parent d290153 commit ffb5b48

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

opengrok-web/src/main/webapp/history.jsp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ document.domReady.push(function() {domReadyHistory();});
258258
<%
259259
int count=0;
260260
for (HistoryEntry entry : hist.getHistoryEntries(maxItems, startIndex)) {
261+
String dispRev = entry.getDisplayRevision();
262+
if (dispRev == null || dispRev.length() == 0) {
263+
dispRev = "";
264+
}
261265
String rev = entry.getRevision();
262266
if (rev == null || rev.length() == 0) {
263267
rev = "";
@@ -281,7 +285,7 @@ document.domReady.push(function() {domReadyHistory();});
281285
<tr><%
282286
if (cfg.isDir()) {
283287
%>
284-
<td><%= rev %></td><%
288+
<td><%= dispRev %></td><%
285289
} else {
286290
if (entry.isActive()) {
287291
StringBuffer urlBuffer = request.getRequestURL();
@@ -293,7 +297,7 @@ document.domReady.push(function() {domReadyHistory();});
293297
<td><a href="<%= urlBuffer %>"
294298
title="link to revision line">#</a>
295299
<a href="<%= context + Prefix.XREF_P + uriEncodedName + "?" +
296-
QueryParameters.REVISION_PARAM_EQ + Util.uriEncode(rev) %>"><%= rev %>
300+
QueryParameters.REVISION_PARAM_EQ + Util.uriEncode(rev) %>"><%= dispRev %>
297301
</a></td>
298302
<td><%
299303
%><input type="radio"
@@ -335,7 +339,7 @@ document.domReady.push(function() {domReadyHistory();});
335339
} else {
336340
striked = true;
337341
%>
338-
<td><del><%= rev %></del></td>
342+
<td><del><%= dispRev %></del></td>
339343
<td></td><%
340344
}
341345
}
@@ -358,7 +362,7 @@ document.domReady.push(function() {domReadyHistory();});
358362
%><%= Util.htmlize(author) %><%
359363
}
360364
%></td>
361-
<td><a name="<%= rev %>"></a><%
365+
<td><a name="<%= dispRev %>"></a><%
362366
// revision message collapse threshold minimum of 10
363367
int summaryLength = Math.max(10, cfg.getRevisionMessageCollapseThreshold());
364368
String cout = Util.htmlize(entry.getMessage());

0 commit comments

Comments
 (0)