history.jsp revision 0
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoCDDL HEADER START
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoThe contents of this file are subject to the terms of the
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoCommon Development and Distribution License (the "License").
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoYou may not use this file except in compliance with the License.
9afe19d634946d50eab30e3b90cb5cebcde39eeaDaniel LezcanoSee LICENSE.txt included in this distribution for the specific
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanolanguage governing permissions and limitations under the License.
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoWhen distributing Covered Code, include this CDDL HEADER in each
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanofile and include the License file at LICENSE.txt.
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoIf applicable, add the following below this CDDL HEADER, with the
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanofields enclosed by brackets "[]" replaced with your own identifying
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanoinformation: Portions Copyright [yyyy] [name of copyright owner]
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoCDDL HEADER END
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoCopyright 2005 Sun Microsystems, Inc. All rights reserved.
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoUse is subject to license terms.
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graberident "@(#)history.jsp 1.1 05/11/11 SMI"
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano--%><%@ page import = "javax.servlet.*,
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%><%@include file="mast.jsp"%><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano boolean striked = false;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String userPage = getInitParameter("USER_PAGE");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String bugPage = getInitParameter("BUG_PAGE");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano Pattern bugPattern = Pattern.compile("\\b([12456789][0-9]{6})\\b");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano Format df = new SimpleDateFormat("dd-MMM-yyyy");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano HistoryReader hr = null;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano Date tstart = new Date();
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String[] apaths = request.getParameterValues("also");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String apath = path;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano if (apaths!= null && apaths.length>0) {
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano StringBuilder paths = new StringBuilder(path);
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano for(int i=0; i< apaths.length; i++) {
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano hr = new DirectoryHistoryReader(getServletContext().getInitParameter("DATA_ROOT") + "/index", apath, getServletContext().getInitParameter("SRC_ROOT"));
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano hr = HistoryGuru.getInstance().getHistoryReader(rawSource + parent, basename);
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano if (hr != null) {
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber%><form action="<%=context%>/diff<%=path%>">
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber<table cellspacing="0" cellpadding="2" border="0" width="100%" class="src">
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber<tr><td colspan="4"><span class="pagetitle">History log of <a href="<%= context +"/xref" + path %>"><%=basename%></a></span></td></tr>
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber<tr class="thead"><%
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber%><td>Revision</td><th><input type="submit" value=" Compare "/></th><%
67e571de63a8e465dc8f1b17e16744a1d3fb552cStéphane Graber%><td>Date</td><td>Author</td><td>Comments</td></tr><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanoboolean alt = true;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String rev = hr.getRevision();
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%><tr valign="top" <%= alt ? "class=\"alt\"" : "" %>><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%><td> <a name="<%=rev%>" href="<%= context +"/xref" + path + "?r=" + rev %>"><%=rev%></a> </td><td align="center"><input type="radio" name="r1" value="<%=rev%>"/>
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano<input type="radio" name="r2" value="<%=rev%>"/></td><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano striked = true;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano %><td><strike> <%=rev%> </strike></td><td> </td><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%><td><%= df.format(hr.getDate()) %> </td>
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanoif(userPage != null && ! userPage.equals("")) {
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano %><a href="<%= userPage + hr.getAuthor() %>"><%= hr.getAuthor() %></a><%
7115cb787d20da6368e3392a97069894ec5d19d6Michel Normand%> </td><td><%=
7115cb787d20da6368e3392a97069894ec5d19d6Michel Normand(bugPage != null && ! bugPage.equals("")) ?
7115cb787d20da6368e3392a97069894ec5d19d6Michel Normand bugPattern.matcher(Util.Htmlize(hr.getComment())).replaceAll("<a href=\"" + bugPage + "$1\">$1</a>")
1490112767ea6e06ea78e80d905b9dad41051798Daniel LezcanoArrayList files = hr.getFiles();
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcanoif(files != null) {
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano Iterator ifiles = files.iterator();
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String ifile = (String)ifiles.next();
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano String jfile = ifile.startsWith(path) ? ifile.substring(path.length()+1) : ifile;
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano %><a class="h" href="<%=context%>/xref<%=ifile%>"><%=jfile%></a><br/><%
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%></td></tr><%
7cab33b107997ba449ee5e8bd70e01dc49524287KATOH Yasufumi %></table></form><%
7cab33b107997ba449ee5e8bd70e01dc49524287KATOH Yasufumi if(striked) {
7cab33b107997ba449ee5e8bd70e01dc49524287KATOH Yasufumi %><p><b>Note:</b> No associated file changes are available for revisions with strike-through numbers (eg. <strike>1.45</strike>)</p><%
7cab33b107997ba449ee5e8bd70e01dc49524287KATOH Yasufumi %><p class="rssbadge"><a href="<%=context%>/rss<%=path%>"><img src="<%=context%>/img/rss.png" width="80" height="15" alt="RSS XML Feed" title="RSS XML Feed of latest changes"/></a></p><%
7cab33b107997ba449ee5e8bd70e01dc49524287KATOH Yasufumi response.sendError(404, "No history");
1490112767ea6e06ea78e80d905b9dad41051798Daniel Lezcano%><%@include file="foot.html"%>