From 78add226e8da271dde8f3b5a91d340d1bf010151 Mon Sep 17 00:00:00 2001 From: jmcp Date: Tue, 6 Jul 2010 17:14:19 -0700 Subject: 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 --- usr/src/tools/scripts/webrev.sh | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'usr/src/tools/scripts/webrev.sh') 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 @@ -3015,21 +3026,6 @@ do # Make the webrev mirror directory if necessary 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 -- cgit v1.2.3