summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/webrev.sh
diff options
context:
space:
mode:
authorjmcp <James.McPherson@Sun.COM>2010-07-06 17:14:19 -0700
committerjmcp <James.McPherson@Sun.COM>2010-07-06 17:14:19 -0700
commit78add226e8da271dde8f3b5a91d340d1bf010151 (patch)
tree56f56a9fd7580a657205222ec4ae6f69094a22dd /usr/src/tools/scripts/webrev.sh
parentdbfe038179f8f9013fb3ed57447316a24e77e93f (diff)
downloadillumos-joyent-78add226e8da271dde8f3b5a91d340d1bf010151.tar.gz
6932341 bfu should be removed
6963210 dubious dependencies in usr/src/Makefile scupper bldenv 'dmake setup' 6962618 cadmium may preserve needless copies from merges Portions contributed by Rich Lowe 6964464 ON build docs didn't track 6593513 6734661 hg-oriented webrev has non-closed blinkers on 6966630 its.reg specifies .eng.sun.com rather than .sfbay.sun.com
Diffstat (limited to 'usr/src/tools/scripts/webrev.sh')
-rw-r--r--usr/src/tools/scripts/webrev.sh40
1 files changed, 18 insertions, 22 deletions
diff --git a/usr/src/tools/scripts/webrev.sh b/usr/src/tools/scripts/webrev.sh
index eb0060963d..ebd6a577af 100644
--- a/usr/src/tools/scripts/webrev.sh
+++ b/usr/src/tools/scripts/webrev.sh
@@ -21,8 +21,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -1767,7 +1766,6 @@ function flist_from_mercurial
typeset parent=$2
print " File list from: hg-active -p $parent ...\c"
-
if [[ ! -x $HG_ACTIVE ]]; then
print # Blank line for the \c above
print -u2 "Error: hg-active tool not found. Exiting"
@@ -2286,10 +2284,25 @@ elif [[ $SCM_MODE == "mercurial" ]]; then
#
# Mercurial priorities:
# 1. hg root from CODEMGR_WS environment variable
+ # 1a. hg root from CODEMGR_WS/usr/closed if we're somewhere under
+ # usr/closed when we run webrev
# 2. hg root from directory of invocation
#
- [[ -z $codemgr_ws && -n $CODEMGR_WS ]] && \
- codemgr_ws=$(hg root -R $CODEMGR_WS 2>/dev/null)
+ if [[ ${PWD} =~ "usr/closed" ]]; then
+ testparent=${CODEMGR_WS}/usr/closed
+ # If we're in OpenSolaris mode, we enforce a minor policy:
+ # help to make sure the reviewer doesn't accidentally publish
+ # source which is under usr/closed
+ if [[ -n "$Oflag" ]]; then
+ print -u2 "OpenSolaris output not permitted with" \
+ "usr/closed changes"
+ exit 1
+ fi
+ else
+ testparent=${CODEMGR_WS}
+ fi
+ [[ -z $codemgr_ws && -n $testparent ]] && \
+ codemgr_ws=$(hg root -R $testparent 2>/dev/null)
[[ -z $codemgr_ws ]] && codemgr_ws=$(hg root 2>/dev/null)
CWS=$codemgr_ws
elif [[ $SCM_MODE == "subversion" ]]; then
@@ -2322,8 +2335,6 @@ if [[ -z ${CWS} ]]; then
CWS=${CODEMGR_WS:-.}
fi
-
-
#
# If the command line options indicate no webrev generation, either
# explicitly (-n) or implicitly (-D but not -U), then there's a whole
@@ -3016,21 +3027,6 @@ do
mkdir -p $WDIR/$DIR
#
- # If we're in OpenSolaris mode, we enforce a minor policy:
- # help to make sure the reviewer doesn't accidentally publish
- # source which is in usr/closed/* or deleted_files/usr/closed/*
- #
- if [[ -n "$Oflag" ]]; then
- pclosed=${P##usr/closed/}
- pdeleted=${P##deleted_files/usr/closed/}
- if [[ "$pclosed" != "$P" || "$pdeleted" != "$P" ]]; then
- print "*** Omitting closed source for OpenSolaris" \
- "mode review"
- continue
- fi
- fi
-
- #
# We stash old and new files into parallel directories in $WDIR
# and do our diffs there. This makes it possible to generate
# clean looking diffs which don't have absolute paths present.