Merge
authorduke
Wed, 05 Jul 2017 18:49:41 +0200
changeset 16700 b7e984dc5090
parent 16699 b1cf5aefa461 (current diff)
parent 16663 02ed1673d56f (diff)
child 16751 4eb3ca9d34b1
Merge
--- a/.hgtags-top-repo	Wed Apr 17 12:38:58 2013 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 18:49:41 2017 +0200
@@ -206,3 +206,4 @@
 29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
 466685ba01bfb7bc1e1ac61490fd8c0f3cc18763 jdk8-b83
 01f631f89fa392b4e484d0812c40ea8f9d2353aa jdk8-b84
+7fc358f5943676b82f1dccd3152b1ac07d92e38b jdk8-b85
--- a/common/autoconf/compare.sh.in	Wed Apr 17 12:38:58 2013 -0700
+++ b/common/autoconf/compare.sh.in	Wed Jul 05 18:49:41 2017 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, 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
--- a/common/bin/compare.sh	Wed Apr 17 12:38:58 2013 -0700
+++ b/common/bin/compare.sh	Wed Jul 05 18:49:41 2017 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, 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
--- a/common/bin/hgforest.sh	Wed Apr 17 12:38:58 2013 -0700
+++ b/common/bin/hgforest.sh	Wed Jul 05 18:49:41 2017 +0200
@@ -30,7 +30,7 @@
 # Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
 # until a lot of time has passed! By passing -u to python, we get incremental updates
 # on stdout. Much nicer.
-whichhg="`which hg`"
+whichhg="`which hg 2> /dev/null | grep -v '^no hg in'`"
 
 if [ "${whichhg}" = "" ] ; then
   echo Cannot find hg!
@@ -51,7 +51,7 @@
    bpython="`basename "$python"`"
 fi
 
-if [ "python" = "$bpython" -a -x "$python" ] ; then
+if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d ' '`" = "Python" ] ; then
   hg="${python} -u ${whichhg}"
 else
   echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
--- a/common/makefiles/Main.gmk	Wed Apr 17 12:38:58 2013 -0700
+++ b/common/makefiles/Main.gmk	Wed Jul 05 18:49:41 2017 +0200
@@ -196,7 +196,7 @@
 
 
 # Remove everything, except the output from configure.
-clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs
+clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs clean-test
 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
 	@$(ECHO) Cleaned all build artifacts.
 
@@ -237,6 +237,8 @@
 clean-docs:
 	$(call CleanComponent,docs)
 	$(call CleanComponent,docstemp)
+clean-test:
+	$(call CleanComponent,testoutput)
 
 .PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install
 .PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only
--- a/make/scripts/webrev.ksh	Wed Apr 17 12:38:58 2013 -0700
+++ b/make/scripts/webrev.ksh	Wed Jul 05 18:49:41 2017 +0200
@@ -1436,14 +1436,15 @@
 {
     rm -f $FLIST
     if [ -z "$Nflag" ]; then
-	print " File list from hg foutgoing $PWS ..."
+        print " File list from hg foutgoing $PWS ..."
         outgoing_from_mercurial_forest
         HG_LIST_FROM_COMMIT=1
     fi
     if [ ! -f $FLIST ]; then
         # hg commit hasn't been run see what is lying around
-	print "\n No outgoing, perhaps you haven't commited."
-	print " File list from hg fstatus -mard ...\c"
+        print "\n No outgoing, perhaps you haven't commited."
+        NO_OUTGOING=
+        print " File list from hg fstatus -mard ...\c"
         FSTAT_OPT=
         fstatus
         HG_LIST_FROM_COMMIT=0
@@ -1466,7 +1467,7 @@
     done >> $FLIST
 
     # Then all the added files
-    # But some of these could have been "moved" or renamed ones
+    # But some of these could have been "moved" or renamed ones or copied ones
     # so let's make sure we get the proper info
     # hg status -aC will produce something like:
     #	A subdir/File3
@@ -1474,8 +1475,11 @@
     #	  File4
     #	A subdir/File5
     # The first and last are simple addition while the middle one
-    # is a move/rename
-
+    # is a move/rename or a copy.  We can't distinguish from a rename vs a copy
+    # without also getting the status of removed files.  The middle case above
+    # is a rename if File4 is also shown a being removed.  If File4 is not a 
+    # removed file, then the middle case is a copy from File4 to subdir/File4
+    # FIXME - we're not distinguishing copy from rename
     $HGCMD -aC | $FILTER | while read LINE; do
 	ldone=""
 	while [ -z "$ldone" ]; do
@@ -1625,6 +1629,7 @@
         else
             # hg commit hasn't been run see what is lying around
             print "\n No outgoing, perhaps you haven't commited."
+            NO_OUTGOING=
         fi
 	# First let's list all the modified or deleted files
 
@@ -1638,8 +1643,12 @@
 	#	A subdir/File4
 	#	  File4
 	#	A subdir/File5
-	# The first and last are simple addition while the middle one
-	# is a move/rename
+        # The first and last are simple addition while the middle one
+        # is a move/rename or a copy.  We can't distinguish from a rename vs a copy
+        # without also getting the status of removed files.  The middle case above
+        # is a rename if File4 is also shown a being removed.  If File4 is not a 
+        # removed file, then the middle case is a copy from File4 to subdir/File4
+        # FIXME - we're not distinguishing copy from rename
 
 	hg status $STATUS_REV -aC | $FILTER >$FLIST.temp
 	while read LINE; do
@@ -1905,7 +1914,7 @@
 		fi
 	    fi
 	else
-	    # It's a rename (or a move), so let's make sure we move
+	    # It's a rename (or a move), or a copy, so let's make sure we move
 	    # to the right directory first, then restore it once done
 	    current_dir=`pwd`
 	    cd $CWS/$PDIR
@@ -2774,34 +2783,38 @@
 	    cleanse_rmfile="sed 's/^\(@@ [0-9+,-]*\) [0-9+,-]* @@$/\1 +0,0 @@/'"
 	    cleanse_newfile="sed 's/^@@ [0-9+,-]* \([0-9+,-]* @@\)$/@@ -0,0 \1/'"
 
-	    rm -f $WDIR/$DIR/$F.patch
-	    if [[ -z $rename ]]; then
-		if [ ! -f $ofile ]; then
-		    diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
-			> $WDIR/$DIR/$F.patch
-		elif [ ! -f $nfile ]; then
-		    diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
-			> $WDIR/$DIR/$F.patch
-		else
-		    diff -u $ofile $nfile > $WDIR/$DIR/$F.patch
-		fi
-	    else
-		diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
-		    > $WDIR/$DIR/$F.patch
-
-		diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
-		    >> $WDIR/$DIR/$F.patch
-
-	    fi
-
-
-	#
-	# Tack the patch we just made onto the accumulated patch for the
-	# whole wad.
-	#
-	    cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch
-
-	    print " patch\c"
+            if [[ -v NO_OUTGOING ]];
+            then
+              # Only need to generate a patch file here if there are no commits in outgoing
+              rm -f $WDIR/$DIR/$F.patch
+              if [[ -z $rename ]]; then
+                  if [ ! -f $ofile ]; then
+                      diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
+                          > $WDIR/$DIR/$F.patch
+                  elif [ ! -f $nfile ]; then
+                      diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
+                          > $WDIR/$DIR/$F.patch
+                  else
+                      diff -u $ofile $nfile > $WDIR/$DIR/$F.patch
+                  fi
+              else
+                  diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
+                      > $WDIR/$DIR/$F.patch
+
+                  diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
+                      >> $WDIR/$DIR/$F.patch
+
+              fi
+
+
+            #
+            # Tack the patch we just made onto the accumulated patch for the
+            # whole wad.
+            #
+              cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch
+            fi
+
+            print " patch\c"
 
 	    if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then
 
@@ -2894,6 +2907,32 @@
 	print
 done < $FLIST
 
+# Create the new style mercurial patch here using hg export -r [all-revs] -g -o $CHANGESETPATH
+if [[ $SCM_MODE == "mercurial" ]]; then
+  if [[ !(-v NO_OUTGOING) ]]; then
+    EXPORTCHANGESET="$WNAME.changeset"
+    CHANGESETPATH=${WDIR}/${EXPORTCHANGESET}
+    rm -f $CHANGESETPATH
+    touch $CHANGESETPATH
+    if [[ -n $ALL_CREV ]]; then
+      rev_opt=
+      for rev in $ALL_CREV; do
+        rev_opt="$rev_opt --rev $rev"
+      done
+    elif [[ -n $FIRST_CREV ]]; then
+      rev_opt="--rev $FIRST_CREV"
+    fi
+
+    if [[ -n $rev_opt ]]; then
+      (cd $CWS;hg export -g $rev_opt -o $CHANGESETPATH)
+      # echo "Created new-patch: $CHANGESETPATH" 1>&2
+      # Use it in place of the jdk.patch created above
+      rm -f $WDIR/$WNAME.patch
+    fi
+  set +x
+  fi
+fi
+
 frame_nav_js > $WDIR/ancnav.js
 frame_navigation > $WDIR/ancnav.html
 
@@ -2989,9 +3028,13 @@
 print "</td></tr>"
 
 if [[ -f $WDIR/$WNAME.patch ]]; then
-	print "<tr><th>Patch of changes:</th><td>"
-	print "<a href=\"$WNAME.patch\">$WNAME.patch</a></td></tr>"
+  print "<tr><th>Patch of changes:</th><td>"
+  print "<a href=\"$WNAME.patch\">$WNAME.patch</a></td></tr>"
+elif [[ -f $CHANGESETPATH ]]; then
+  print "<tr><th>Changeset:</th><td>"
+  print "<a href=\"$EXPORTCHANGESET\">$EXPORTCHANGESET</a></td></tr>"
 fi
+
 if [[ -f $WDIR/$WNAME.pdf ]]; then
 	print "<tr><th>Printable review:</th><td>"
 	print "<a href=\"$WNAME.pdf\">$WNAME.pdf</a></td></tr>"