Print this page
7436 webrev doesn't work if illumos-gate is a submodule
Reviewed by: Toomas Soome <tsoome@me.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/webrev.sh
          +++ new/usr/src/tools/scripts/webrev.sh
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20  # CDDL HEADER END
  21   21  #
  22   22  
  23   23  #
  24   24  # Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  25   25  # Copyright 2008, 2010, Richard Lowe
  26   26  # Copyright 2012 Marcel Telka <marcel@telka.sk>
  27   27  # Copyright 2014 Bart Coddens <bart.coddens@gmail.com>
  28   28  # Copyright 2016 Nexenta Systems, Inc.
  29   29  # Copyright 2016 Joyent, Inc.
       30 +# Copyright 2016 RackTop Systems.
  30   31  #
  31   32  
  32   33  #
  33   34  # This script takes a file list and a workspace and builds a set of html files
  34   35  # suitable for doing a code review of source changes via a web page.
  35   36  # Documentation is available via the manual page, webrev.1, or just
  36   37  # type 'webrev -h'.
  37   38  #
  38   39  # Acknowledgements to contributors to webrev are listed in the webrev(1)
  39   40  # man page.
↓ open down ↓ 2315 lines elided ↑ open up ↑
2355 2356          [[ -z $codemgr_ws && -n $CODEMGR_WS ]] && \
2356 2357              codemgr_ws=$($GIT --git-dir=$CODEMGR_WS/.git rev-parse --git-dir \
2357 2358                  2>/dev/null)
2358 2359          [[ -z $codemgr_ws ]] && \
2359 2360              codemgr_ws=$($GIT rev-parse --git-dir 2>/dev/null)
2360 2361  
2361 2362          if [[ "$codemgr_ws" == ".git" ]]; then
2362 2363                  codemgr_ws="${PWD}/${codemgr_ws}"
2363 2364          fi
2364 2365  
2365      -        codemgr_ws=$(dirname $codemgr_ws) # Lose the '/.git'
     2366 +        if [[ "$codemgr_ws" = *"/.git" ]]; then
     2367 +                codemgr_ws=$(dirname $codemgr_ws) # Lose the '/.git'
     2368 +        fi
2366 2369          CWS="$codemgr_ws"
2367 2370  elif [[ $SCM_MODE == "subversion" ]]; then
2368 2371          #
2369 2372          # Subversion priorities:
2370 2373          # 1. CODEMGR_WS from environment
2371 2374          # 2. Relative path from current directory to SVN repository root
2372 2375          #
2373 2376          if [[ -n $CODEMGR_WS && -d $CODEMGR_WS/.svn ]]; then
2374 2377                  CWS=$CODEMGR_WS
2375 2378          else
↓ open down ↓ 1286 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX