# HG changeset patch # User mduigou # Date 1389732541 28800 # Node ID 2ddbe00bd56cd876f9840d41f36756fecdc94ed6 # Parent 59d2bd4620b0bcc0bc4268c545b2769ce5ed613a 8011180: remove obsolete scripts Reviewed-by: smarks, erikj, psandoz diff -r 59d2bd4620b0 -r 2ddbe00bd56c make/scripts/hgforest.sh --- a/make/scripts/hgforest.sh Tue Jan 14 10:25:22 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Shell script for a fast parallel forest command -command="$1" -pull_extra_base="$2" - -tmp=/tmp/forest.$$ -rm -f -r ${tmp} -mkdir -p ${tmp} - -# Remove tmp area on A. B. Normal termination -trap 'rm -f -r ${tmp}' KILL -trap 'rm -f -r ${tmp}' EXIT - -# Only look in specific locations for possible forests (avoids long searches) -pull_default="" -repos="" -repos_extra="" -if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then - subrepos="corba jaxp jaxws langtools jdk hotspot nashorn" - if [ -f .hg/hgrc ] ; then - pull_default=`hg paths default` - if [ "${pull_default}" = "" ] ; then - echo "ERROR: Need initial clone with 'hg paths default' defined" - exit 1 - fi - fi - if [ "${pull_default}" = "" ] ; then - echo "ERROR: Need initial repository to use this script" - exit 1 - fi - for i in ${subrepos} ; do - if [ ! -f ${i}/.hg/hgrc ] ; then - repos="${repos} ${i}" - fi - done - if [ "${pull_extra_base}" != "" ] ; then - subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs" - pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'` - pull_extra="${pull_extra_base}/${pull_default_tail}" - for i in ${subrepos_extra} ; do - if [ ! -f ${i}/.hg/hgrc ] ; then - repos_extra="${repos_extra} ${i}" - fi - done - fi - at_a_time=2 - # Any repos to deal with? - if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then - echo "No repositories to clone." - exit - fi -else - hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null` - # Derive repository names from the .hg directory locations - for i in ${hgdirs} ; do - repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`" - done - at_a_time=8 - # Any repos to deal with? - if [ "${repos}" = "" ] ; then - echo "No repositories to process." - exit - fi -fi - -# Echo out what repositories we will clone -echo "# Repos: ${repos} ${repos_extra}" - -# Run the supplied command on all repos in parallel, save output until end -n=0 -for i in ${repos} ; do - echo "Starting on ${i}" - n=`expr ${n} '+' 1` - ( - ( - if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then - pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`" - cline="hg clone ${pull_newrepo} ${i}" - echo "# ${cline}" - ( eval "${cline}" ) - else - cline="hg $*" - echo "# cd ${i} && ${cline}" - ( cd ${i} && eval "${cline}" ) - fi - echo "# exit code $?" - ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) & - if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then - sleep 5 - fi -done -# Wait for all hg commands to complete -wait - -if [ "${repos_extra}" != "" ] ; then - for i in ${repos_extra} ; do - echo "Starting on ${i}" - n=`expr ${n} '+' 1` - ( - ( - pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`" - cline="hg clone ${pull_newextrarepo} ${i}" - echo "# ${cline}" - ( eval "${cline}" ) - echo "# exit code $?" - ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) & - if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then - sleep 5 - fi - done - # Wait for all hg commands to complete - wait -fi - -# Cleanup -rm -f -r ${tmp} - -# Terminate with exit 0 all the time (hard to know when to say "failed") -exit 0 - diff -r 59d2bd4620b0 -r 2ddbe00bd56c make/scripts/webrev.ksh --- a/make/scripts/webrev.ksh Tue Jan 14 10:25:22 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2783 +0,0 @@ -#!/bin/ksh -p -# -# 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. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License 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 usr/src/OPENSOLARIS.LICENSE. -# 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) 2008, 2013, Oracle and/or its affiliates. All rights reserved. -# Use is subject to license terms. -# -# This script takes a file list and a workspace and builds a set of html files -# suitable for doing a code review of source changes via a web page. -# Documentation is available via 'webrev -h'. -# - -WEBREV_UPDATED=25.1-hg+openjdk.java.net - -HTML=' - -\n' - -FRAMEHTML=' - -\n' - -STDHEAD=' - - - - - - - -' - -# -# UDiffs need a slightly different CSS rule for 'new' items (we don't -# want them to be bolded as we do in cdiffs or sdiffs). -# -UDIFFCSS=' - -' - -# -# input_cmd | html_quote | output_cmd -# or -# html_quote filename | output_cmd -# -# Make a piece of source code safe for display in an HTML
block. -# -html_quote() -{ - sed -e "s/&/\&/g" -e "s/&#\([x]*[0-9A-Fa-f]\{2,5\}\);/\\1;/g" -e "s/\</g" -e "s/>/\>/g" "$@" | expand -} - -# -# input_cmd | html_quote | output_cmd -# or -# html_dequote filename | output_cmd -# -# Replace HTML entities with literals -# -html_dequote() -{ - sed -e "s/"/\"/g" -e "s/'/\'/g" -e "s/&/\&/g" -e "s/</<'/g" -e "s/>/>/g" "$@" | expand -} - -# -# input_cmd | bug2url | output_cmd -# -# Scan for bugids and insert links to the relevent bug database. -# -bug2url() -{ - sed -e 's|[0-9]\{5,\}|&|g' -} - -# -# strip_unchanged| output_cmd -# -# Removes chunks of sdiff documents that have not changed. This makes it -# easier for a code reviewer to find the bits that have changed. -# -# Deleted lines of text are replaced by a horizontal rule. Some -# identical lines are retained before and after the changed lines to -# provide some context. The number of these lines is controlled by the -# variable C in the $AWK script below. -# -# The script detects changed lines as any line that has a "%%4d %%s\\n\", NR, $0}\n" - printf "function bl() {printf \"%%4d %%s\\n\", NR, $0}\n" -} - /^ {next} - /^>/ {next} - /^---/ {next} - - { - split($1, a, /[cad]/) ; - if (index($1, "a")) { - if (a[1] == 0) { - n = split(a[2], r, /,/); - if (n == 1) - printf "BEGIN\t\t{sp(1)}\n" - else - printf "BEGIN\t\t{sp(%d)}\n",\ - (r[2] - r[1]) + 1 - next - } - - printf "NR==%s\t\t{", a[1] - n = split(a[2], r, /,/); - s = r[1]; - if (n == 1) - printf "bl();printf \"\\n\"; next}\n" - else { - n = r[2] - r[1] - printf "bl();sp(%d);next}\n",\ - (r[2] - r[1]) + 1 - } - next - } - if (index($1, "d")) { - n = split(a[1], r, /,/); - n1 = r[1] - n2 = r[2] - if (n == 1) - printf "NR==%s\t\t{removed(); next}\n" , n1 - else - printf "NR==%s,NR==%s\t{removed(); next}\n" , n1, n2 - next - } - if (index($1, "c")) { - n = split(a[1], r, /,/); - n1 = r[1] - n2 = r[2] - final = n2 - d1 = 0 - if (n == 1) - printf "NR==%s\t\t{changed();" , n1 - else { - d1 = n2 - n1 - printf "NR==%s,NR==%s\t{changed();" , n1, n2 - } - m = split(a[2], r, /,/); - n1 = r[1] - n2 = r[2] - if (m > 1) { - d2 = n2 - n1 - if (d2 > d1) { - if (n > 1) printf "if (NR==%d)", final - printf "sp(%d);", d2 - d1 - } - } - printf "next}\n" ; - - next - } - } - - END { printf "{printf \"%%4d %%s\\n\", NR, $0 }\n" } - ' /tmp/$$.diffs > /tmp/$$.file1 - - # - # Now generate the HTML for the new file - # - $AWK ' - BEGIN { - printf "function sp(n) {for (i=0;i \\n\", NR, $0}\n" - printf "function changed() " - printf "{printf \"%%4d %%s\\n\", NR, $0}\n" - printf "function changed() " - printf "{printf \"%%4d %%s\\n\", NR, $0}\n" - printf "function bl() {printf \"%%4d %%s\\n\", NR, $0}\n" - } - - /^ {next} - /^>/ {next} - /^---/ {next} - - { - split($1, a, /[cad]/) ; - if (index($1, "d")) { - if (a[2] == 0) { - n = split(a[1], r, /,/); - if (n == 1) - printf "BEGIN\t\t{sp(1)}\n" - else - printf "BEGIN\t\t{sp(%d)}\n",\ - (r[2] - r[1]) + 1 - next - } - - printf "NR==%s\t\t{", a[2] - n = split(a[1], r, /,/); - s = r[1]; - if (n == 1) - printf "bl();printf \"\\n\"; next}\n" - else { - n = r[2] - r[1] - printf "bl();sp(%d);next}\n",\ - (r[2] - r[1]) + 1 - } - next - } - if (index($1, "a")) { - n = split(a[2], r, /,/); - n1 = r[1] - n2 = r[2] - if (n == 1) - printf "NR==%s\t\t{new() ; next}\n" , n1 - else - printf "NR==%s,NR==%s\t{new() ; next}\n" , n1, n2 - next - } - if (index($1, "c")) { - n = split(a[2], r, /,/); - n1 = r[1] - n2 = r[2] - final = n2 - d2 = 0; - if (n == 1) { - final = n1 - printf "NR==%s\t\t{changed();" , n1 - } else { - d2 = n2 - n1 - printf "NR==%s,NR==%s\t{changed();" , n1, n2 - } - m = split(a[1], r, /,/); - n1 = r[1] - n2 = r[2] - if (m > 1) { - d1 = n2 - n1 - if (d1 > d2) { - if (n > 1) printf "if (NR==%d)", final - printf "sp(%d);", d1 - d2 - } - } - printf "next}\n" ; - next - } - } - END { printf "{printf \"%%4d %%s\\n\", NR, $0 }\n" } - ' /tmp/$$.diffs > /tmp/$$.file2 - - # - # Post-process the HTML files by running them back through $AWK - # - html_quote < $1 | $AWK -f /tmp/$$.file1 > /tmp/$$.file1.html - - html_quote < $2 | $AWK -f /tmp/$$.file2 > /tmp/$$.file2.html - - # - # Now combine into a valid HTML file and side-by-side into a table - # - print "$HTML$STDHEAD" - print " $WNAME Sdiff $TPATH " - print "" - print "$TPATH/$TNAME
" - print "Print this page" - print "$COMMENT\n" - print "" - print "" - - framed_sdiff $TNAME $TPATH /tmp/$$.file1.html /tmp/$$.file2.html \ - "$COMMENT" -} - - -# -# framed_sdiff
" - print " " - - strip_unchanged /tmp/$$.file1.html - - print "" - print " " - - strip_unchanged /tmp/$$.file2.html - - print "-# -# Expects lefthand and righthand side html files created by sdiff_to_html. -# We use insert_anchors() to augment those with HTML navigation anchors, -# and then emit the main frame. Content is placed into: -# -# $WDIR/DIR/$TNAME.lhs.html -# $WDIR/DIR/$TNAME.rhs.html -# $WDIR/DIR/$TNAME.frames.html -# -# NOTE: We rely on standard usage of $WDIR and $DIR. -# -function framed_sdiff -{ - typeset TNAME=$1 - typeset TPATH=$2 - typeset lhsfile=$3 - typeset rhsfile=$4 - typeset comments=$5 - typeset RTOP - - # Enable html files to access WDIR via a relative path. - RTOP=$(relative_dir $TPATH $WDIR) - - # Make the rhs/lhs files and output the frameset file. - print "$HTML$STDHEAD" > $WDIR/$DIR/$TNAME.lhs.html - - cat >> $WDIR/$DIR/$TNAME.lhs.html <<-EOF - - - - - $comments
- EOF - - cp $WDIR/$DIR/$TNAME.lhs.html $WDIR/$DIR/$TNAME.rhs.html - - insert_anchors $lhsfile >> $WDIR/$DIR/$TNAME.lhs.html - insert_anchors $rhsfile >> $WDIR/$DIR/$TNAME.rhs.html - - close='' - - print $close >> $WDIR/$DIR/$TNAME.lhs.html - print $close >> $WDIR/$DIR/$TNAME.rhs.html - - print "$FRAMEHTML$STDHEAD" > $WDIR/$DIR/$TNAME.frames.html - print "$WNAME Framed-Sdiff " \ - "$TPATH/$TNAME " >> $WDIR/$DIR/$TNAME.frames.html - cat >> $WDIR/$DIR/$TNAME.frames.html <<-EOF - -