Mercurial > hg > openjdk > lambda
changeset 667:60ab41568f02
Merge
author | mduigou |
---|---|
date | Wed, 20 Feb 2013 09:44:58 -0800 |
parents | 4beaca4a3201 (current diff) bbb7548d45c7 (diff) |
children | f97b9845b851 |
files | .hgtags common/autoconf/generated-configure.sh common/makefiles/JavaCompilation.gmk common/makefiles/javadoc/CORE_PKGS.gmk common/makefiles/javadoc/Javadoc.gmk |
diffstat | 16 files changed, 203 insertions(+), 77 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Tue Feb 05 16:50:05 2013 +0100 +++ b/.hgtags Wed Feb 20 09:44:58 2013 -0800 @@ -200,3 +200,6 @@ c1be681d80a1f1c848dc671d664fccb19e046a12 jdk8-b72 93b9664f97eeb6f89397a8842318ebacaac9feb9 jdk8-b73 b43aa5bd8ca5c8121336495382d35ecfa7a71536 jdk8-b74 +2a713921952cbd77a1e699626976cb6cdfe3e57e jdk8-b75 +278af9fc67e7eba2884936b49ec07345f423aabb jdk8-b76 +3933eebc659d58c597aa8cb4b3e58f2250ce3e1a jdk8-b77
--- a/common/autoconf/generated-configure.sh Tue Feb 05 16:50:05 2013 +0100 +++ b/common/autoconf/generated-configure.sh Wed Feb 20 09:44:58 2013 -0800 @@ -3723,7 +3723,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1358499442 +DATE_WHEN_GENERATED=1359971740 ############################################################################### # @@ -10778,7 +10778,8 @@ as_fn_error $? "Milestone must have a value" "$LINENO" 5 elif test "x$with_milestone" != x; then MILESTONE="$with_milestone" -else +fi +if test "x$MILESTONE" = x; then MILESTONE=internal fi @@ -29247,6 +29248,12 @@ fi +# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling +# this doesn't make sense so we remove it. +if test "x$COMPILE_TYPE" = xcross; then + X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` +fi + if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then # Print a helpful message on how to acquire the necessary build dependency.
--- a/common/autoconf/jdk-options.m4 Tue Feb 05 16:50:05 2013 +0100 +++ b/common/autoconf/jdk-options.m4 Wed Feb 20 09:44:58 2013 -0800 @@ -389,7 +389,8 @@ AC_MSG_ERROR([Milestone must have a value]) elif test "x$with_milestone" != x; then MILESTONE="$with_milestone" -else +fi +if test "x$MILESTONE" = x; then MILESTONE=internal fi
--- a/common/autoconf/libraries.m4 Tue Feb 05 16:50:05 2013 +0100 +++ b/common/autoconf/libraries.m4 Wed Feb 20 09:44:58 2013 -0800 @@ -136,6 +136,12 @@ AC_PATH_X AC_PATH_XTRA +# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling +# this doesn't make sense so we remove it. +if test "x$COMPILE_TYPE" = xcross; then + X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'` +fi + if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then HELP_MSG_MISSING_DEPENDENCY([x11]) AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
--- a/common/autoconf/spec.gmk.in Tue Feb 05 16:50:05 2013 +0100 +++ b/common/autoconf/spec.gmk.in Wed Feb 20 09:44:58 2013 -0800 @@ -434,6 +434,12 @@ JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner +# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... +BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar +BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR) +NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main +NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main + # Base flags for RC # Guarding this against resetting value. Legacy make files include spec multiple # times.
--- a/common/bin/compare.sh Tue Feb 05 16:50:05 2013 +0100 +++ b/common/bin/compare.sh Wed Feb 20 09:44:58 2013 -0800 @@ -350,9 +350,15 @@ OTHER_DIR=$2 WORK_DIR=$3 ZIP_FILE=$4 + # Optionally provide different name for other zipfile + OTHER_ZIP_FILE=$5 THIS_ZIP=$THIS_DIR/$ZIP_FILE - OTHER_ZIP=$OTHER_DIR/$ZIP_FILE + if [ -n "$OTHER_ZIP_FILE" ]; then + OTHER_ZIP=$OTHER_DIR/$OTHER_ZIP_FILE + else + OTHER_ZIP=$OTHER_DIR/$ZIP_FILE + fi THIS_SUFFIX="${THIS_ZIP##*.}" OTHER_SUFFIX="${OTHER_ZIP##*.}" @@ -962,6 +968,9 @@ echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" echo "Example:" echo "bash ./common/bin/compareimages.sh CodePointIM.jar" + echo "" + echo "-2zips <file1> <file2> Compare two zip files only" + echo "" exit 10 fi @@ -1023,6 +1032,13 @@ -execs) CMP_EXECS=true ;; + -2zips) + CMP_2_ZIPS=true + THIS_FILE=$2 + OTHER_FILE=$3 + shift + shift + ;; *) CMP_NAMES=false CMP_PERMS=false @@ -1041,6 +1057,18 @@ shift done +if [ "$CMP_2_ZIPS" = "true" ]; then + THIS_DIR="$(dirname $THIS_FILE)" + THIS_DIR="$(cd "$THIS_DIR" && pwd )" + OTHER_DIR="$(dirname $OTHER_FILE)" + OTHER_DIR="$(cd "$OTHER_DIR" && pwd )" + THIS_FILE_NAME="$(basename $THIS_FILE)" + OTHER_FILE_NAME="$(basename $OTHER_FILE)" + echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME + compare_zip_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2zips $THIS_FILE_NAME $OTHER_FILE_NAME + exit +fi + if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then CMP_NAMES=true CMP_PERMS=true
--- a/common/bin/compare_exceptions.sh.incl Tue Feb 05 16:50:05 2013 +0100 +++ b/common/bin/compare_exceptions.sh.incl Wed Feb 20 09:44:58 2013 -0800 @@ -887,6 +887,17 @@ ./jre/bin/unpack200.exe " +# jabswitch.exe is compiled and linked with incremental turned on in the old +# build. This makes no sense, so it's turned off in the new build. +ACCEPTED_SIZE_DIFF=" +./bin/jabswitch.exe +./jre/bin/jabswitch.exe +" +ACCEPTED_DIS_DIFF=" +./bin/jabswitch.exe +./jre/bin/jabswitch.exe +" + # On windows, there are unavoidable allignment issues making # a perfect disasm diff impossible. Filter out the following: # * Random parts of C++ symbols (this is a bit greedy, but does the trick)
--- a/common/bin/hgforest.sh Tue Feb 05 16:50:05 2013 +0100 +++ b/common/bin/hgforest.sh Wed Feb 20 09:44:58 2013 -0800 @@ -64,33 +64,33 @@ mkdir -p ${tmp} safe_interrupt () { - if [ -d ${tmp} ]; then - if [ "`ls ${tmp}`" != "" ]; then - echo "Waiting for processes ( `cat ${tmp}/* | tr '\n' ' '`) to terminate nicely!" + if [ -d ${tmp} ]; then + if [ "`ls ${tmp}/*.pid`" != "" ]; then + echo "Waiting for processes ( `cat ${tmp}/*.pid | tr '\n' ' '`) to terminate nicely!" sleep 1 # Pipe stderr to dev/null to silence kill, that complains when trying to kill # a subprocess that has already exited. - kill -TERM `cat ${tmp}/* | tr '\n' ' '` 2> /dev/null - wait - echo Interrupt complete! - fi + kill -TERM `cat ${tmp}/*.pid | tr '\n' ' '` 2> /dev/null + wait + echo Interrupt complete! + fi fi rm -f -r ${tmp} exit 1 } nice_exit () { - if [ -d ${tmp} ]; then - if [ "`ls ${tmp}`" != "" ]; then - wait - fi + if [ -d ${tmp} ]; then + if [ "`ls ${tmp}`" != "" ]; then + wait + fi fi rm -f -r ${tmp} } trap 'safe_interrupt' INT QUIT trap 'nice_exit' EXIT - + # Only look in specific locations for possible forests (avoids long searches) pull_default="" repos="" @@ -172,14 +172,26 @@ if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`" echo ${hg} clone ${pull_newrepo} ${i} - ${hg} clone ${pull_newrepo} ${i} & + path="`dirname ${i}`" + if [ "${path}" != "." ] ; then + times=0 + while [ ! -d "${path}" ] ## nested repo, ensure containing dir exists + do + times=`expr ${times} '+' 1` + if [ `expr ${times} '%' 10` -eq 0 ] ; then + echo ${path} still not created, waiting... + fi + sleep 5 + done + fi + (${hg} clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )& else echo "cd ${i} && ${hg} $*" - cd ${i} && ${hg} "$@" & - fi + cd ${i} && (${hg} "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )& + fi echo $! > ${tmp}/${repopidfile}.pid ) 2>&1 | sed -e "s@^@${reponame}: @") & - + if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then sleep 2 echo Waiting 5 secs before spawning next background command. @@ -189,6 +201,15 @@ # Wait for all hg commands to complete wait -# Terminate with exit 0 all the time (hard to know when to say "failed") -exit 0 - +# Terminate with exit 0 only if all subprocesses were successful +ec=0 +if [ -d ${tmp} ]; then + for rc in ${tmp}/*.pid.rc ; do + exit_code=`cat ${rc} | tr -d ' \n\r'` + if [ "${exit_code}" != "0" ] ; then + echo "WARNING: ${rc} exited abnormally." + ec=1 + fi + done +fi +exit ${ec}
--- a/common/makefiles/IdlCompilation.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/IdlCompilation.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -71,7 +71,7 @@ $4 $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6) $(CP) -rp $3/$$($4_TMPDIR)/* $3 - ($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5) + ($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5) $(RM) -rf $3/$$($4_TMPDIR) endef
--- a/common/makefiles/JavaCompilation.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/JavaCompilation.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -42,8 +42,8 @@ FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST define SetupJavaCompiler - # param 1 is for example BOOT_JAVAC or NEW_JAVAC - # This is the name later used to decide which java compiler to use. + # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE + # This is the name of the compiler setup. # param 2-9 are named args. # JVM:=The jvm used to run the javac/javah command # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out @@ -487,10 +487,10 @@ # Using sjavac to compile. $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state - # Create SJAVAC variable, - # expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar" - # and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main" - $1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main + # Create SJAVAC variable form JAVAC variable. Expects $1_JAVAC to be + # "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main" + # and javac is simply replaced with sjavac. + $1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC)) # Set the $1_REMOTE to spawn a background javac server. $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
--- a/common/makefiles/Jprt.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/Jprt.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -179,27 +179,52 @@ $(JPRT_ARCHIVE_BUNDLE): bundles $(MKDIR) -p $(@D) $(RM) $@ - $(CP) $(BUILD_OUTPUT)/bundles/j2sdk-image.zip $@ + $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ -# This target must be called in the context of a SPEC file -bundles: all +ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) + SRC_JDK_IMAGE_DIR := $(JDK_OVERLAY_IMAGE_DIR) + SRC_JRE_IMAGE_DIR := $(JRE_OVERLAY_IMAGE_DIR) +else + SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) + SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) +endif +SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) +SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) + +# Bundle up the images +bundles: all bundles-only +bundles-only: start-make @$(call TargetEnter) $(MKDIR) -p $(BUILD_OUTPUT)/bundles -ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) - $(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . - $(CD) $(JRE_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . -else - $(CD) $(JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . - $(CD) $(JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . + $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . + $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ fi + @$(call TargetExit) + +# Copy images to one unified location regardless of platform etc. +final-images: all final-images-only +final-images-only: start-make + @$(call TargetEnter) + $(RM) -r $(BUILD_OUTPUT)/final-images + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) + $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ + $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ +ifeq ($(OPENJDK_TARGET_OS),macosx) + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) + $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) + $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ + $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ endif @$(call TargetExit) + # Keep track of phony targets PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ - jprt_build_generic bundles jprt_bundle + jprt_build_generic bundles jprt_bundle \ + final-images final-images-only ########################################################################### # Phony targets
--- a/common/makefiles/Main.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/Main.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -75,7 +75,14 @@ all: overlay-images endif -start-make: +# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration +# is up to date after changes to configure +$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*) + @$(ECHO) ERROR: $(SPEC) is not up to date + @$(ECHO) Please rerun configure! + @if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi + +start-make: $(SPEC) @$(call AtMakeStart) langtools: langtools-only
--- a/common/makefiles/javadoc/CORE_PKGS.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/javadoc/CORE_PKGS.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -128,9 +128,9 @@ java.text \ java.text.spi \ java.time \ + java.time.chrono \ + java.time.format \ java.time.temporal \ - java.time.calendar \ - java.time.format \ java.time.zone \ java.util \ java.util.concurrent \
--- a/common/makefiles/javadoc/Javadoc.gmk Tue Feb 05 16:50:05 2013 +0100 +++ b/common/makefiles/javadoc/Javadoc.gmk Wed Feb 20 09:44:58 2013 -0800 @@ -46,14 +46,11 @@ BUILD_NUMBER=$(JDK_BUILD_NUMBER) -BOOT_JAVA_CMD=$(JAVA) - -JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar -JAVADOC_CMD = $(BOOT_JAVA_CMD) \ +JAVADOC_CMD = $(JAVA) \ -Xmx1024m \ -Djava.awt.headless=true \ - "-Xbootclasspath/p:$(JAVADOC_JAR)" \ - -jar $(JAVADOC_JAR) -bootclasspath $(JDK_OUTPUTDIR)/classes + $(NEW_JAVADOC) \ + -bootclasspath $(JDK_OUTPUTDIR)/classes # Copyright year for beginning of Java and some of the apis # (Needed when creating the javadocs)
--- a/get_source.sh Tue Feb 05 16:50:05 2013 +0100 +++ b/get_source.sh Wed Feb 20 09:44:58 2013 -0800 @@ -26,7 +26,7 @@ # # Get clones of all nested repositories -sh ./common/bin/hgforest.sh clone "$@" +sh ./common/bin/hgforest.sh clone "$@" || exit 1 # Update all existing repositories to the latest sources sh ./common/bin/hgforest.sh pull -u
--- a/make/scripts/webrev.ksh Tue Feb 05 16:50:05 2013 +0100 +++ b/make/scripts/webrev.ksh Wed Feb 20 09:44:58 2013 -0800 @@ -19,7 +19,7 @@ # # CDDL HEADER END # -# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +# 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 @@ -27,7 +27,7 @@ # Documentation is available via 'webrev -h'. # -WEBREV_UPDATED=23.18-hg +WEBREV_UPDATED=23.18-hg+jbs HTML='<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" @@ -146,7 +146,7 @@ # bug2url() { - sed -e 's|[0-9]\{5,\}|<a href=\"'$BUGURL'&\">&</a>|g' + sed -e 's|[0-9]\{5,\}|<a href=\"'$BUGURL$IDPREFIX'&\">&</a>|g' } # @@ -230,8 +230,8 @@ # $ sdiff_to_html old/usr/src/tools/scripts/webrev.sh \ # new/usr/src/tools/scripts/webrev.sh \ # webrev.sh usr/src/tools/scripts \ -# '<a href="http://monaco.sfbay.sun.com/detail.jsp?cr=1234567"> -# 1234567</a> my bugid' > <file>.html +# '<a href="https://jbs.oracle.com/bugs/browse/JDK-1234567"> +# JDK-1234567</a> my bugid' > <file>.html # # framed_sdiff() is then called which creates $2.frames.html # in the webrev tree. @@ -1160,7 +1160,7 @@ print "$comm" return fi - + print "$comm" | html_quote | bug2url | sac2url ) fi @@ -1418,7 +1418,7 @@ next;} END {for (tree in trees) { rev=revs[trees[tree]]; - if (rev > 0) + if (rev > 0) {printf("%s %d\n",trees[tree],rev-1)} }}' | while read LINE do @@ -1459,7 +1459,7 @@ { TREE=$1 HGCMD="hg -R $CWS/$TREE status $FSTAT_OPT" - + $HGCMD -mdn 2>/dev/null | $FILTER | while read F do echo $TREE/$F @@ -1543,7 +1543,7 @@ if (n == 0) { printf("A %s/%s\n",tree,$2)} else - { printf("A %s\n",$2)}; + { printf("A %s\n",$2)}; next} /^ / {n=index($1,tree); if (n == 0) @@ -1604,7 +1604,7 @@ # We need at least one of default-push or default paths set in .hg/hgrc # If neither are set we don't know who to compare with. -function flist_from_mercurial +function flist_from_mercurial { # if [ "${PWS##ssh://}" != "$PWS" -o \ # "${PWS##http://}" != "$PWS" -o \ @@ -1757,7 +1757,7 @@ elif [[ "$OS" == "Linux" ]]; then DEVTOOLS="/java/devtools/linux/bin" fi - + ppath=$PATH ppath=$ppath:/usr/sfw/bin:/usr/bin:/usr/sbin ppath=$ppath:/opt/teamware/bin:/opt/onbld/bin @@ -1844,7 +1844,7 @@ ssh_host=`echo $CMD | sed -e 's/ssh:\/\/\([^/]*\)\/.*/\1/'` ssh_dir=`echo $CMD | sed -e 's/ssh:\/\/[^/]*\/\(.*\)/\1/'` fi - + } function build_old_new_mercurial @@ -2096,7 +2096,7 @@ PARENT_REV=$OPTARG;; v) print "$0 version: $WEBREV_UPDATED";; - + ?) usage;; esac @@ -2338,7 +2338,7 @@ # [[ -z $codemgr_ws && -n $CODEMGR_WS ]] && codemgr_ws=$CODEMGR_WS [[ -z $codemgr_ws && -n $WSPACE ]] && codemgr_ws=`$WSPACE name` - + if [[ -n $codemgr_ws && ! -d $codemgr_ws ]]; then print -u2 "$codemgr_ws: no such workspace" exit 1 @@ -2521,10 +2521,16 @@ # Bug IDs will be replaced by a URL. Order of precedence # is: default location, $WEBREV_BUGURL, the -O flag. # -BUGURL='http://monaco.sfbay.sun.com/detail.jsp?cr=' +BUGURL='https://jbs.oracle.com/bugs/browse/' [[ -n $WEBREV_BUGURL ]] && BUGURL="$WEBREV_BUGURL" -[[ -n "$Oflag" ]] && \ +if [[ -n "$Oflag" ]]; then + CRID=`echo $CRID | sed -e 's/JDK-//'` BUGURL='http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=' + IDPREFIX='' +else + IDPREFIX='JDK-' +fi + # # Likewise, ARC cases will be replaced by a URL. Order of precedence @@ -2561,7 +2567,7 @@ # # Should we ignore changes in white spaces when generating diffs? -# +# if [[ -n $bflag ]]; then DIFFOPTS="-t" else @@ -2748,7 +2754,7 @@ fi fi else - + # # If we have old and new versions of the file then run the # appropriate diffs. This is complicated by a couple of factors: @@ -3000,22 +3006,31 @@ # external URL has a <title> like: # <title>Bug ID: 6641309 Wrong Cookie separator used in HttpURLConnection</title> # while internal URL has <title> like: -# <title>6641309: Wrong Cookie separator used in HttpURLConnection</title> +# <title>[#JDK-6641309] Wrong Cookie separator used in HttpURLConnection</title> # if [[ -n $CRID ]]; then for id in $CRID do + if [[ -z "$Oflag" ]]; then + #add "JDK-" to raw bug id for jbs links. + id=`echo ${id} | sed 's/^\([0-9]\{5,\}\)$/JDK-\1/'` + fi print "<tr><th>Bug id:</th><td>" url="${BUGURL}${id}" - if [[ -n $WGET ]]; then - msg=`$WGET -q $url -O - | grep '<title>' | sed 's/<title>\(.*\)<\/title>/\1/' | sed 's/Bug ID://'` + if [[ -n "$Oflag" ]]; then + cleanup='s/Bug ID: \([0-9]\{5,\}\) \(.*\)/JDK-\1 : \2/' + else + cleanup='s|\[#\(JDK-[0-9]\{5,\}\)\] \(.*\)|\1 : \2|' fi - if [[ -n $msg ]]; then - print "<a href=\"$url\">$msg</a>" - else - print $id | bug2url + if [[ -n $WGET ]]; then + msg=`$WGET --timeout=10 --tries=1 -q $url -O - | grep '<title>' | sed 's/<title>\(.*\)<\/title>/\1/' | sed "$cleanup"` fi - + if [[ -z $msg ]]; then + msg="${id}" + fi + + print "<a href=\"$url\">$msg</a>" + print "</td></tr>" done fi @@ -3179,4 +3194,3 @@ print "Done." print "Output to: $WDIR" -