|
42 | 42 | # through project, it's good to have Verbose
|
43 | 43 | # Mode enabled too, cost of this is one more
|
44 | 44 | # traversal of the project before indexing it(*)
|
45 |
| -# - OPENGROK_DISABLE_RENAMED_FILES_HISTORY Disable getting full history of |
| 45 | +# - OPENGROK_RENAMED_FILES_HISTORY If set to "on", get full history of |
46 | 46 | # renamed files for SCMs that support it (Git,
|
47 | 47 | # Mercurial).
|
48 |
| -# The default is handle the history which makes |
49 |
| -# indexing slower, especially in the presence of |
| 48 | +# The default is off. |
| 49 | +# When set to on, the indexing is slower, |
| 50 | +# especially in the presence of |
50 | 51 | # lots of renamed files in the repository.
|
51 |
| -# Set it to non-empty value to disable the |
52 |
| -# renamed files history handling. |
53 | 52 | # - OPENGROK_GENERATE_HISTORY Influence history cache generation
|
54 | 53 | # Following values are recognized:
|
55 | 54 | # on - enabled (default)
|
@@ -107,9 +106,13 @@ Usage()
|
107 | 106 | echo ""
|
108 | 107 | echo "Usage: ${progname} <bootstrap|deploy|derby|update|updateQuietly|usage|help>"
|
109 | 108 | echo " ${progname} index [<directory>]"
|
110 |
| - echo " ${progname} indexpart <src_root> <directory1> [..]" |
| 109 | + echo " ${progname} indexpart <directory_1> [<directory_2> ..]" |
111 | 110 | echo " ${progname} clearHistory <src_root> <repository_name>"
|
112 | 111 | echo ""
|
| 112 | + echo " The \"indexpart\" assumes that it will be run with configuration" |
| 113 | + echo " pointed to via the OPENGROK_READ_XML_CONFIGURATION environment" |
| 114 | + echo " variable." |
| 115 | + echo "" |
113 | 116 | echo " Optional environment variables:"
|
114 | 117 | echo " OPENGROK_CONFIGURATION - location of your configuration"
|
115 | 118 | echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... "
|
|
134 | 137 | exit 1
|
135 | 138 | fi
|
136 | 139 |
|
137 |
| -SCRIPT_FILE=`readlink -f "${0}"` |
138 |
| -SCRIPT_DIRECTORY=`dirname "${SCRIPT_FILE}"` |
| 140 | +SCRIPT_DIRECTORY=`dirname "${0}"` |
| 141 | +export SCRIPT_DIRECTORY=`cd "${SCRIPT_DIRECTORY}"; pwd -P` |
139 | 142 |
|
140 | 143 | #
|
141 | 144 | # Default Instance Configuration
|
@@ -282,9 +285,11 @@ DefaultInstanceConfiguration()
|
282 | 285 | GENERATE_HISTORY="${GENERATE_HISTORY} -H"
|
283 | 286 | fi
|
284 | 287 |
|
285 |
| - if [ -n "$OPENGROK_DISABLE_RENAMED_FILES_HISTORY" ] |
| 288 | + if [ "$OPENGROK_RENAMED_FILES_HISTORY" != "on" ] |
286 | 289 | then
|
287 |
| - DISABLE_RENAMED_FILES_HISTORY="-D" |
| 290 | + RENAMED_FILES_HISTORY="-D off" |
| 291 | + else |
| 292 | + RENAMED_FILES_HISTORY="-D on" |
288 | 293 | fi
|
289 | 294 |
|
290 | 295 | # OPTIONAL: override depth of scanning for repositories
|
@@ -815,7 +820,7 @@ CommonInvocation()
|
815 | 820 | ${IGNORE_PATTERNS} \
|
816 | 821 | ${HISTORY_TAGS} \
|
817 | 822 | ${GENERATE_HISTORY} \
|
818 |
| - ${DISABLE_RENAMED_FILES_HISTORY} \ |
| 823 | + ${RENAMED_FILES_HISTORY} \ |
819 | 824 | ${SCAN_DEPTH} \
|
820 | 825 | ${PROGRESS} \
|
821 | 826 | ${OPENGROK_CTAGS:+-c} ${OPENGROK_CTAGS} \
|
@@ -1053,12 +1058,14 @@ case "${1}" in
|
1053 | 1058 | ;;
|
1054 | 1059 |
|
1055 | 1060 | indexpart)
|
1056 |
| - if [ $# -ne 3 ] |
| 1061 | + if [ $# -ne 2 ] |
1057 | 1062 | then
|
1058 | 1063 | Usage
|
1059 | 1064 | fi
|
1060 |
| - SRC_ROOT="${2}" |
1061 |
| - shift 2 |
| 1065 | + shift |
| 1066 | + if [ -z "$OPENGROK_READ_XML_CONFIGURATION" ]; then |
| 1067 | + FatalError "need configuration via OPENGROK_READ_XML_CONFIGURATION" |
| 1068 | + fi |
1062 | 1069 | ValidateConfiguration
|
1063 | 1070 | CreateRuntimeRequirements
|
1064 | 1071 | UpdateDataPartial $@
|
|
0 commit comments