history.jsp revision e50a9c1259497ecf05f1f45b5673df4d9a723bd8
3eedfb6dd90308259bcfeddaa2cc883c1219df76henning muellerCDDL HEADER START
06a33d2469033eb5c23396e5f4e5733fb24c0e9ehenning muellerThe contents of this file are subject to the terms of the
db5e5ce1aaece909027be839755bcea14679f1e0Julian KornbergerCommon Development and Distribution License (the "License").
04ff797f3ad57f3671b7f7063c782b9d2faf3882henning muellerYou may not use this file except in compliance with the License.
cdb58a323a2a1b4c2191163a6a6772658462c136Julian KornbergerSee LICENSE.txt included in this distribution for the specific
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornbergerlanguage governing permissions and limitations under the License.
ee5342a8882c2fc7631fcffb5497e6597747887cTim ReddehaseWhen distributing Covered Code, include this CDDL HEADER in each
7e3ffdd270e31d82db163acaf6d0849cb7dda0e8Julian Kornbergerfile and include the License file at LICENSE.txt.
cdb58a323a2a1b4c2191163a6a6772658462c136Julian KornbergerIf applicable, add the following below this CDDL HEADER, with the
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehasefields enclosed by brackets "[]" replaced with your own identifying
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornbergerinformation: Portions Copyright [yyyy] [name of copyright owner]
cdb58a323a2a1b4c2191163a6a6772658462c136Julian KornbergerCDDL HEADER END
cdb58a323a2a1b4c2191163a6a6772658462c136Julian KornbergerCopyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
cdb58a323a2a1b4c2191163a6a6772658462c136Julian KornbergerPortions Copyright 2011 Jens Elkner.
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornberger--%><%@page import="
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornbergerorg.opensolaris.opengrok.history.HistoryEntry,
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornbergerorg.opensolaris.opengrok.history.HistoryException,
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornbergerorg.opensolaris.opengrok.configuration.RuntimeEnvironment"
cdb58a323a2a1b4c2191163a6a6772658462c136Julian Kornberger%><%/* ---------------------- history.jsp start --------------------- */
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehase PageConfig cfg = PageConfig.get(request);
3eedfb6dd90308259bcfeddaa2cc883c1219df76henning mueller String path = cfg.getPath();
if (path.length() > 0) {
String context = request.getContextPath();
RuntimeEnvironment env = cfg.getEnv();
String uriEncodedName = cfg.getUriEncodedPath();
String userPage = env.getUserPage();
String userPageSuffix = env.getUserPageSuffix();
String bugPage = env.getBugPage();
String bugRegex = env.getBugPattern();
if (bugRegex == null || bugRegex.equals("")) {
Pattern bugPattern = Pattern.compile(bugRegex);
String reviewPage = env.getReviewPage();
String reviewRegex = env.getReviewPattern();
if(reviewRegex == null || reviewRegex.equals("")) {
Pattern reviewPattern = Pattern.compile(reviewRegex);
File f = cfg.getResourceFile();
hist = HistoryGuru.getInstance().getHistory(f);
%><h3>Problem</h3><p class="error"><%= e.getMessage() %></p><%
%><script type="text/javascript">/* <![CDATA[ */
document.domReady.push(function() {domReadyHistory();});
<form action="<%= context + Prefix.DIFF_P + uriEncodedName %>">
<caption>History log of <a href="<%= context + Prefix.XREF_P
if (!cfg.isDir()) {
if (hist.hasFileList()) {
for (HistoryEntry entry : hist.getHistoryEntries()) {
String rev = entry.getRevision();
if (rev == null || rev.length() == 0) {
if (cfg.isDir()) {
if (entry.isActive()) {
Date date = entry.getDate();
%><%= df.format(date) %><%
String author = entry.getAuthor();
} else if (userPage != null && userPage.length() > 0) {
String alink = Util.getEmail(author);
%><a href="<%= userPage + Util.htmlize(alink) + userPageSuffix
%>"><%= Util.htmlize(author)%></a><%
if (bugPage != null && bugPage.length() > 0) {
cout = bugPattern.matcher(cout).replaceAll("<a href=\""
if (reviewPage != null && reviewPage.length() > 0) {
cout = reviewPattern.matcher(cout).replaceAll("<a href=\""
Set<String> files = entry.getFiles();
jfile = ifile.substring(1);
} else if (ifile.startsWith(path)
<a class="h" href="<%= context + Prefix.XREF_P + ifile %>"><%= jfile %></a><br/><%
<a class="h" href="<%= context + Prefix.XREF_P + ifile %>?r=<%= rev %>"><%= jfile %></a><br/><%
<p class="rssbadge"><a href="<%=context + Prefix.RSS_P + uriEncodedName
/* ---------------------- history.jsp end --------------------- */
include file="foot.jspf"