%-- $Id$ CDDL HEADER START The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. See LICENSE.txt included in this distribution for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at LICENSE.txt. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] CDDL HEADER END Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. Portions Copyright 2011, 2012 Jens Elkner. --%><%@page import=" java.io.File, java.text.Format, java.text.SimpleDateFormat, java.util.Date, java.util.EnumSet, java.util.Set, java.util.regex.Pattern, org.opensolaris.opengrok.Info, org.opensolaris.opengrok.configuration.Configuration, org.opensolaris.opengrok.configuration.Project, org.opensolaris.opengrok.history.History, org.opensolaris.opengrok.history.HistoryEntry, org.opensolaris.opengrok.history.HistoryGuru, org.opensolaris.opengrok.web.PageConfig, org.opensolaris.opengrok.web.Prefix, org.opensolaris.opengrok.web.Util, org.opensolaris.opengrok.web.WebappListener" %><%@ include file="mast.jspf" %><%/* ---------------------- history.jsp start --------------------- */ { PageConfig cfg = PageConfig.get(request); String path = cfg.getPath(); if (path.length() > 0) { String context = request.getContextPath(); Configuration conf = cfg.getConfig(); String uriEncodedName = cfg.getUriEncodedPath(); boolean striked = false; String userPage = conf.getUserPage(); String userPageSuffix = conf.getUserPageSuffix(); if (userPageSuffix == null) { // Set to empty string so we can append it to the URL // unconditionally later. userPageSuffix = ""; } String bugPage = conf.getBugPage(); String bugRegex = conf.getBugPattern(); if (bugRegex == null || bugRegex.equals("")) { bugRegex = "\\b([12456789][0-9]{6})\\b"; } Pattern bugPattern = Pattern.compile(bugRegex); String reviewPage = conf.getReviewPage(); String reviewRegex = conf.getReviewPattern(); if(reviewRegex == null || reviewRegex.equals("")) { reviewRegex = "\\b(\\d{4}/\\d{3})\\b"; } Pattern reviewPattern = Pattern.compile(reviewRegex); Format df = new SimpleDateFormat("dd-MMM-yyyy"); History hist = null; try { hist = HistoryGuru.getInstance() .getHistory(new File(cfg.getSourceRootPath(), path), true, cfg.isDir()); } catch (Exception e) { // should not happen %>
<%= e.getMessage() %>
<% } if (hist != null) { %> <% if (striked) { %>Note: No associated file changes are available for
revisions with strike-through numbers (eg. 1.45)