-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b08
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8063164 | 8u45 | Chris Hegarty | P4 | Resolved | Fixed | b01 |
JDK-8051048 | 8u40 | Chris Hegarty | P4 | Resolved | Fixed | b01 |
JDK-8071111 | emb-8u47 | Chris Hegarty | P4 | Resolved | Fixed | team |
The output of hgforest can be a little confusing when trying to push/status/in using the hgforest.sh script. This is because the script runs several jobs in parallel, and the output overlaps.
This issue would like to add an option to support sequential operation of commands. It is off by default.
diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
--- a/common/bin/hgforest.sh
+++ b/common/bin/hgforest.sh
@@ -29,6 +29,7 @@
status_output="/dev/stdout"
qflag="false"
vflag="false"
+sflag="false"
while [ $# -gt 0 ]
do
case $1 in
@@ -43,6 +44,10 @@
global_opts="${global_opts} -v"
;;
+ -s | --sequential )
+ sflag="true"
+ ;;
+
'--' ) # no more options
shift; break
;;
@@ -63,7 +68,7 @@
command_args="$@"
usage() {
- echo "usage: $0 [-q|--quiet] [-v|--verbose] [--] <command> [commands...]" > ${status_output}
+ echo "usage: $0 [-q|--quiet] [-v|--verbose] [-s|--sequential] [--] <command> [commands...]" > ${status_output}
exit 1
}
@@ -243,11 +248,15 @@
) 2>&1 | sed -e "s@^@${reponame}: @" > ${status_output}
) &
- if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
+ if [ `expr ${n} '%' ${at_a_time}` -eq 0 -a "${sflag}" = "false" ] ; then
sleep 2
echo "Waiting 5 secs before spawning next background command." > ${status_output}
sleep 3
fi
+
+ if [ "${sflag}" = "true" ] ; then
+ wait
+ fi
done
fi
This issue would like to add an option to support sequential operation of commands. It is off by default.
diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
--- a/common/bin/hgforest.sh
+++ b/common/bin/hgforest.sh
@@ -29,6 +29,7 @@
status_output="/dev/stdout"
qflag="false"
vflag="false"
+sflag="false"
while [ $# -gt 0 ]
do
case $1 in
@@ -43,6 +44,10 @@
global_opts="${global_opts} -v"
;;
+ -s | --sequential )
+ sflag="true"
+ ;;
+
'--' ) # no more options
shift; break
;;
@@ -63,7 +68,7 @@
command_args="$@"
usage() {
- echo "usage: $0 [-q|--quiet] [-v|--verbose] [--] <command> [commands...]" > ${status_output}
+ echo "usage: $0 [-q|--quiet] [-v|--verbose] [-s|--sequential] [--] <command> [commands...]" > ${status_output}
exit 1
}
@@ -243,11 +248,15 @@
) 2>&1 | sed -e "s@^@${reponame}: @" > ${status_output}
) &
- if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
+ if [ `expr ${n} '%' ${at_a_time}` -eq 0 -a "${sflag}" = "false" ] ; then
sleep 2
echo "Waiting 5 secs before spawning next background command." > ${status_output}
sleep 3
fi
+
+ if [ "${sflag}" = "true" ] ; then
+ wait
+ fi
done
fi
- backported by
-
JDK-8051048 Add sequential operation support to hgforest
-
- Resolved
-
-
JDK-8063164 Add sequential operation support to hgforest
-
- Resolved
-
-
JDK-8071111 Add sequential operation support to hgforest
-
- Resolved
-