Merge

Tue, 16 Apr 2013 08:10:59 -0700

author
lana
date
Tue, 16 Apr 2013 08:10:59 -0700
changeset 684
4c13b7994f38
parent 676
44bc9bc4da4d
parent 683
11c057460b91
child 687
df9b5240f0a7
child 691
2600c8d8b619

Merge

common/makefiles/Main.gmk file | annotate | diff | comparison | revisions
     1.1 --- a/common/bin/hgforest.sh	Thu Apr 11 09:39:46 2013 -0700
     1.2 +++ b/common/bin/hgforest.sh	Tue Apr 16 08:10:59 2013 -0700
     1.3 @@ -30,7 +30,7 @@
     1.4  # Python always buffers stdout significantly, thus we will not see any output from hg clone jdk,
     1.5  # until a lot of time has passed! By passing -u to python, we get incremental updates
     1.6  # on stdout. Much nicer.
     1.7 -whichhg="`which hg`"
     1.8 +whichhg="`which hg 2> /dev/null | grep -v '^no hg in'`"
     1.9  
    1.10  if [ "${whichhg}" = "" ] ; then
    1.11    echo Cannot find hg!
    1.12 @@ -51,7 +51,7 @@
    1.13     bpython="`basename "$python"`"
    1.14  fi
    1.15  
    1.16 -if [ "python" = "$bpython" -a -x "$python" ] ; then
    1.17 +if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d ' '`" = "Python" ] ; then
    1.18    hg="${python} -u ${whichhg}"
    1.19  else
    1.20    echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.
     2.1 --- a/common/makefiles/Main.gmk	Thu Apr 11 09:39:46 2013 -0700
     2.2 +++ b/common/makefiles/Main.gmk	Tue Apr 16 08:10:59 2013 -0700
     2.3 @@ -196,7 +196,7 @@
     2.4  
     2.5  
     2.6  # Remove everything, except the output from configure.
     2.7 -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
     2.8 +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
     2.9  	@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
    2.10  	@$(ECHO) Cleaned all build artifacts.
    2.11  
    2.12 @@ -237,6 +237,8 @@
    2.13  clean-docs:
    2.14  	$(call CleanComponent,docs)
    2.15  	$(call CleanComponent,docstemp)
    2.16 +clean-test:
    2.17 +	$(call CleanComponent,testoutput)
    2.18  
    2.19  .PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install
    2.20  .PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only
     3.1 --- a/make/scripts/webrev.ksh	Thu Apr 11 09:39:46 2013 -0700
     3.2 +++ b/make/scripts/webrev.ksh	Tue Apr 16 08:10:59 2013 -0700
     3.3 @@ -1436,14 +1436,15 @@
     3.4  {
     3.5      rm -f $FLIST
     3.6      if [ -z "$Nflag" ]; then
     3.7 -	print " File list from hg foutgoing $PWS ..."
     3.8 +        print " File list from hg foutgoing $PWS ..."
     3.9          outgoing_from_mercurial_forest
    3.10          HG_LIST_FROM_COMMIT=1
    3.11      fi
    3.12      if [ ! -f $FLIST ]; then
    3.13          # hg commit hasn't been run see what is lying around
    3.14 -	print "\n No outgoing, perhaps you haven't commited."
    3.15 -	print " File list from hg fstatus -mard ...\c"
    3.16 +        print "\n No outgoing, perhaps you haven't commited."
    3.17 +        NO_OUTGOING=
    3.18 +        print " File list from hg fstatus -mard ...\c"
    3.19          FSTAT_OPT=
    3.20          fstatus
    3.21          HG_LIST_FROM_COMMIT=0
    3.22 @@ -1466,7 +1467,7 @@
    3.23      done >> $FLIST
    3.24  
    3.25      # Then all the added files
    3.26 -    # But some of these could have been "moved" or renamed ones
    3.27 +    # But some of these could have been "moved" or renamed ones or copied ones
    3.28      # so let's make sure we get the proper info
    3.29      # hg status -aC will produce something like:
    3.30      #	A subdir/File3
    3.31 @@ -1474,8 +1475,11 @@
    3.32      #	  File4
    3.33      #	A subdir/File5
    3.34      # The first and last are simple addition while the middle one
    3.35 -    # is a move/rename
    3.36 -
    3.37 +    # is a move/rename or a copy.  We can't distinguish from a rename vs a copy
    3.38 +    # without also getting the status of removed files.  The middle case above
    3.39 +    # is a rename if File4 is also shown a being removed.  If File4 is not a 
    3.40 +    # removed file, then the middle case is a copy from File4 to subdir/File4
    3.41 +    # FIXME - we're not distinguishing copy from rename
    3.42      $HGCMD -aC | $FILTER | while read LINE; do
    3.43  	ldone=""
    3.44  	while [ -z "$ldone" ]; do
    3.45 @@ -1625,6 +1629,7 @@
    3.46          else
    3.47              # hg commit hasn't been run see what is lying around
    3.48              print "\n No outgoing, perhaps you haven't commited."
    3.49 +            NO_OUTGOING=
    3.50          fi
    3.51  	# First let's list all the modified or deleted files
    3.52  
    3.53 @@ -1638,8 +1643,12 @@
    3.54  	#	A subdir/File4
    3.55  	#	  File4
    3.56  	#	A subdir/File5
    3.57 -	# The first and last are simple addition while the middle one
    3.58 -	# is a move/rename
    3.59 +        # The first and last are simple addition while the middle one
    3.60 +        # is a move/rename or a copy.  We can't distinguish from a rename vs a copy
    3.61 +        # without also getting the status of removed files.  The middle case above
    3.62 +        # is a rename if File4 is also shown a being removed.  If File4 is not a 
    3.63 +        # removed file, then the middle case is a copy from File4 to subdir/File4
    3.64 +        # FIXME - we're not distinguishing copy from rename
    3.65  
    3.66  	hg status $STATUS_REV -aC | $FILTER >$FLIST.temp
    3.67  	while read LINE; do
    3.68 @@ -1905,7 +1914,7 @@
    3.69  		fi
    3.70  	    fi
    3.71  	else
    3.72 -	    # It's a rename (or a move), so let's make sure we move
    3.73 +	    # It's a rename (or a move), or a copy, so let's make sure we move
    3.74  	    # to the right directory first, then restore it once done
    3.75  	    current_dir=`pwd`
    3.76  	    cd $CWS/$PDIR
    3.77 @@ -2774,34 +2783,38 @@
    3.78  	    cleanse_rmfile="sed 's/^\(@@ [0-9+,-]*\) [0-9+,-]* @@$/\1 +0,0 @@/'"
    3.79  	    cleanse_newfile="sed 's/^@@ [0-9+,-]* \([0-9+,-]* @@\)$/@@ -0,0 \1/'"
    3.80  
    3.81 -	    rm -f $WDIR/$DIR/$F.patch
    3.82 -	    if [[ -z $rename ]]; then
    3.83 -		if [ ! -f $ofile ]; then
    3.84 -		    diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
    3.85 -			> $WDIR/$DIR/$F.patch
    3.86 -		elif [ ! -f $nfile ]; then
    3.87 -		    diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
    3.88 -			> $WDIR/$DIR/$F.patch
    3.89 -		else
    3.90 -		    diff -u $ofile $nfile > $WDIR/$DIR/$F.patch
    3.91 -		fi
    3.92 -	    else
    3.93 -		diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
    3.94 -		    > $WDIR/$DIR/$F.patch
    3.95 -
    3.96 -		diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
    3.97 -		    >> $WDIR/$DIR/$F.patch
    3.98 -
    3.99 -	    fi
   3.100 -
   3.101 -
   3.102 -	#
   3.103 -	# Tack the patch we just made onto the accumulated patch for the
   3.104 -	# whole wad.
   3.105 -	#
   3.106 -	    cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch
   3.107 -
   3.108 -	    print " patch\c"
   3.109 +            if [[ -v NO_OUTGOING ]];
   3.110 +            then
   3.111 +              # Only need to generate a patch file here if there are no commits in outgoing
   3.112 +              rm -f $WDIR/$DIR/$F.patch
   3.113 +              if [[ -z $rename ]]; then
   3.114 +                  if [ ! -f $ofile ]; then
   3.115 +                      diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
   3.116 +                          > $WDIR/$DIR/$F.patch
   3.117 +                  elif [ ! -f $nfile ]; then
   3.118 +                      diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
   3.119 +                          > $WDIR/$DIR/$F.patch
   3.120 +                  else
   3.121 +                      diff -u $ofile $nfile > $WDIR/$DIR/$F.patch
   3.122 +                  fi
   3.123 +              else
   3.124 +                  diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \
   3.125 +                      > $WDIR/$DIR/$F.patch
   3.126 +
   3.127 +                  diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \
   3.128 +                      >> $WDIR/$DIR/$F.patch
   3.129 +
   3.130 +              fi
   3.131 +
   3.132 +
   3.133 +            #
   3.134 +            # Tack the patch we just made onto the accumulated patch for the
   3.135 +            # whole wad.
   3.136 +            #
   3.137 +              cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch
   3.138 +            fi
   3.139 +
   3.140 +            print " patch\c"
   3.141  
   3.142  	    if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then
   3.143  
   3.144 @@ -2894,6 +2907,32 @@
   3.145  	print
   3.146  done < $FLIST
   3.147  
   3.148 +# Create the new style mercurial patch here using hg export -r [all-revs] -g -o $CHANGESETPATH
   3.149 +if [[ $SCM_MODE == "mercurial" ]]; then
   3.150 +  if [[ !(-v NO_OUTGOING) ]]; then
   3.151 +    EXPORTCHANGESET="$WNAME.changeset"
   3.152 +    CHANGESETPATH=${WDIR}/${EXPORTCHANGESET}
   3.153 +    rm -f $CHANGESETPATH
   3.154 +    touch $CHANGESETPATH
   3.155 +    if [[ -n $ALL_CREV ]]; then
   3.156 +      rev_opt=
   3.157 +      for rev in $ALL_CREV; do
   3.158 +        rev_opt="$rev_opt --rev $rev"
   3.159 +      done
   3.160 +    elif [[ -n $FIRST_CREV ]]; then
   3.161 +      rev_opt="--rev $FIRST_CREV"
   3.162 +    fi
   3.163 +
   3.164 +    if [[ -n $rev_opt ]]; then
   3.165 +      (cd $CWS;hg export -g $rev_opt -o $CHANGESETPATH)
   3.166 +      # echo "Created new-patch: $CHANGESETPATH" 1>&2
   3.167 +      # Use it in place of the jdk.patch created above
   3.168 +      rm -f $WDIR/$WNAME.patch
   3.169 +    fi
   3.170 +  set +x
   3.171 +  fi
   3.172 +fi
   3.173 +
   3.174  frame_nav_js > $WDIR/ancnav.js
   3.175  frame_navigation > $WDIR/ancnav.html
   3.176  
   3.177 @@ -2989,9 +3028,13 @@
   3.178  print "</td></tr>"
   3.179  
   3.180  if [[ -f $WDIR/$WNAME.patch ]]; then
   3.181 -	print "<tr><th>Patch of changes:</th><td>"
   3.182 -	print "<a href=\"$WNAME.patch\">$WNAME.patch</a></td></tr>"
   3.183 +  print "<tr><th>Patch of changes:</th><td>"
   3.184 +  print "<a href=\"$WNAME.patch\">$WNAME.patch</a></td></tr>"
   3.185 +elif [[ -f $CHANGESETPATH ]]; then
   3.186 +  print "<tr><th>Changeset:</th><td>"
   3.187 +  print "<a href=\"$EXPORTCHANGESET\">$EXPORTCHANGESET</a></td></tr>"
   3.188  fi
   3.189 +
   3.190  if [[ -f $WDIR/$WNAME.pdf ]]; then
   3.191  	print "<tr><th>Printable review:</th><td>"
   3.192  	print "<a href=\"$WNAME.pdf\">$WNAME.pdf</a></td></tr>"

mercurial