-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmkwebrev.sh
executable file
·85 lines (73 loc) · 1.8 KB
/
mkwebrev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
set -e
jdk=jdk11u-dev
jdk=jdk
REPO_DIR=`pwd`/$jdk
SCRIPT_DIR=`pwd`/xx
WEBREV_BASE=`pwd`/webrevs
. $SCRIPT_DIR/tools.sh `pwd`/tools webrev mercurial
mkdir -p "$WEBREV_BASE"
repos="jdk hotspot corba nashorn langtools jaxp jaxws"
repos=""
# NOTE: the sed RE is very different on a mac vs Linux!
mkwebrev() {
# $1 repo-dir $2 webrev-dir $3 CR#
RD=$1
WD=$2
CR=`echo $3 | sed -E 's/[^0-9]*([0-9]+)[^0-9]*.*/\1/g'`
pushd "$RD" >/dev/null
N=`hg status | wc -l`
if [ $N != 0 ] ; then
webrev.ksh -b -w -o "$WD" -c $CR
mv $WD/webrev/* $WD/webrev/..
rmdir $WD/webrev
else
echo " (no differences)"
fi
popd >/dev/null
}
mkrevs() {
# $1 CR $2 NUM
find "$REPO_DIR" -name \*.rej -exec rm {} \; 2>/dev/null || true
find "$REPO_DIR" -name \*.orig -exec rm {} \; 2>/dev/null || true
WEBREV_DIR="$WEBREV_BASE/jdk-$1/$2"
mkwebrev "$REPO_DIR" "$WEBREV_DIR/$2" $1
for a in $repos ; do
echo processing "$REPO_DIR/$a"
mkwebrev "$REPO_DIR/$a" "$WEBREV_DIR/$a.$2" $1
done
}
update() {
pushd "$REPO_DIR" >/dev/null
find "$REPO_DIR" -name \*.rej -exec rm {} \; 2>/dev/null || true
find "$REPO_DIR" -name \*.orig -exec rm {} \; 2>/dev/null || true
hg pull -u
for a in $repos ; do
cd $a
hg pull -u
cd ..
done
popd >/dev/null
}
clean() {
rm -fr "$REPO_DIR/build"
find "$REPO_DIR" -name \*.rej -exec rm {} \; 2>/dev/null || true
find "$REPO_DIR" -name \*.orig -exec rm {} \; 2>/dev/null || true
}
revert() {
pushd "$REPO_DIR" >/dev/null
find "$REPO_DIR" -name \*.rej -exec rm {} \; 2>/dev/null || true
find "$REPO_DIR" -name \*.orig -exec rm {} \; 2>/dev/null || true
hg revert .
for a in $repos ; do
cd $a
hg revert .
cd ..
done
popd >/dev/null
}
#revert
#update
#cd "$REPO_DIR/jdk"
#hg import -f --no-commit "$BUILD_DIR/8181872-jdk8.patch"
mkrevs 8216354-jdk 00