make/scripts/webrev.ksh

Print this page
rev 912 : 8029512: webrev.ksh: fix parsing of parent repo paths from hgrc file
Reviewed-by: duke

*** 25,35 **** # This script takes a file list and a workspace and builds a set of html files # suitable for doing a code review of source changes via a web page. # Documentation is available via 'webrev -h'. # ! WEBREV_UPDATED=25.1-hg+openjdk.java.net HTML='<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n' --- 25,35 ---- # This script takes a file list and a workspace and builds a set of html files # suitable for doing a code review of source changes via a web page. # Documentation is available via 'webrev -h'. # ! WEBREV_UPDATED=25.2-hg+openjdk.java.net HTML='<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n'
*** 1939,1965 **** if [[ -z $pflag ]]; then OUTPWS= fi else # ! # Unfortunately mercurial is bugged and doesn't handle # aliases correctly in 'hg path default' # So let's do it ourselves. Sigh... if [[ -z "$OUTPWS" ]]; then ! OUTPWS=`grep default-push $CWS/.hg/hgrc | $AWK '{print $3}' | $FILTER` fi # Still empty, means no default-push if [[ -z "$OUTPWS" ]]; then ! OUTPWS=`grep 'default =' $CWS/.hg/hgrc | $AWK '{print $3}' | $FILTER` fi # Let's try to expand it if it's an alias defined in [paths] tmp=`hg path $OUTPWS 2>/dev/null | $FILTER` if [[ -n $tmp ]]; then OUTPWS="$tmp" fi fi fi # # OUTPWS may contain username:password, let's make sure we remove the # sensitive information before we print out anything in the HTML # OUTPWS2=$OUTPWS --- 1939,1967 ---- if [[ -z $pflag ]]; then OUTPWS= fi else # ! # Unfortunately mercurial is bugged (in some unknown version) and may not handle # aliases correctly in 'hg path default' # So let's do it ourselves. Sigh... if [[ -z "$OUTPWS" ]]; then ! OUTPWS=`sed -n -e '0,/^default-push/s/^default-push[[:space:]]*=[[:space:]]*\(.*\)$/\1/p' .hg/hgrc || $FILTER` fi # Still empty, means no default-push if [[ -z "$OUTPWS" ]]; then ! OUTPWS=`sed -n -e '0,/^default/s/^default[[:space:]]*=[[:space:]]*\(.*\)$/\1/p' .hg/hgrc | | $FILTER` fi # Let's try to expand it if it's an alias defined in [paths] + if [[ -n "$OUTPWS" ]]; then tmp=`hg path $OUTPWS 2>/dev/null | $FILTER` if [[ -n $tmp ]]; then OUTPWS="$tmp" fi fi fi + fi # # OUTPWS may contain username:password, let's make sure we remove the # sensitive information before we print out anything in the HTML # OUTPWS2=$OUTPWS