提交 d9acad67 编写于 作者: D duke

Merge

......@@ -206,3 +206,4 @@ fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
466685ba01bfb7bc1e1ac61490fd8c0f3cc18763 jdk8-b83
01f631f89fa392b4e484d0812c40ea8f9d2353aa jdk8-b84
7fc358f5943676b82f1dccd3152b1ac07d92e38b jdk8-b85
#!/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
......
#!/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
......
......@@ -30,7 +30,7 @@ pull_extra_base="$2"
# 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 @@ if [ "#!" = "$has_hash_bang" ] ; then
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.
......
......@@ -196,7 +196,7 @@ $(OUTPUT_ROOT)/source_tips: FRC
# 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-bootcycle-build:
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
......
......@@ -1436,14 +1436,15 @@ function flist_from_mercurial_forest
{
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 @@ function treestatus
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 @@ function treestatus
# 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 @@ function flist_from_mercurial
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 @@ function flist_from_mercurial
# 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 @@ function build_old_new_mercurial
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 @@ do
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
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
#
# 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"
print " patch\c"
if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then
......@@ -2894,6 +2907,32 @@ do
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 @@ printCI $TOTL $TINS $TDEL $TMOD $TUNC
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>"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册