Skip to content

Commit 78bc0f3

Browse files
committed
Merge branch 'master' of https://github.com/OpenGrok/OpenGrok into powershellAddition
2 parents 0961984 + 3ffb2f9 commit 78bc0f3

File tree

68 files changed

+2008
-1435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2008
-1435
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Any kind of contribution is welcome. If you are not sure whether your idea is in line with
22
the general direction of the project, feel free to submit new Issue first and let's get the discussion started there.
33

4+
Please follow pre-existing coding style.
5+
46
Asking questions via creating new Issue is fine also.
57

68
When submitting a new Issue for what seems is a bug, please note the version you're running and ideally steps to reproduce.
79

8-
For pull requests to be merged, we need contributors to get Oracle Contributor Agreement first.
10+
For a pull request to be merged, we need the contributor to sign Oracle Contributor Agreement first.
911
See http://www.oracle.com/technetwork/community/oca-486395.html for details.

OpenGrok

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,13 @@
4242
# through project, it's good to have Verbose
4343
# Mode enabled too, cost of this is one more
4444
# 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
4646
# renamed files for SCMs that support it (Git,
4747
# 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
5051
# lots of renamed files in the repository.
51-
# Set it to non-empty value to disable the
52-
# renamed files history handling.
5352
# - OPENGROK_GENERATE_HISTORY Influence history cache generation
5453
# Following values are recognized:
5554
# on - enabled (default)
@@ -107,9 +106,13 @@ Usage()
107106
echo ""
108107
echo "Usage: ${progname} <bootstrap|deploy|derby|update|updateQuietly|usage|help>"
109108
echo " ${progname} index [<directory>]"
110-
echo " ${progname} indexpart <src_root> <directory1> [..]"
109+
echo " ${progname} indexpart <directory_1> [<directory_2> ..]"
111110
echo " ${progname} clearHistory <src_root> <repository_name>"
112111
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 ""
113116
echo " Optional environment variables:"
114117
echo " OPENGROK_CONFIGURATION - location of your configuration"
115118
echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... "
@@ -134,8 +137,8 @@ else
134137
exit 1
135138
fi
136139

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`
139142

140143
#
141144
# Default Instance Configuration
@@ -282,9 +285,11 @@ DefaultInstanceConfiguration()
282285
GENERATE_HISTORY="${GENERATE_HISTORY} -H"
283286
fi
284287

285-
if [ -n "$OPENGROK_DISABLE_RENAMED_FILES_HISTORY" ]
288+
if [ "$OPENGROK_RENAMED_FILES_HISTORY" != "on" ]
286289
then
287-
DISABLE_RENAMED_FILES_HISTORY="-D"
290+
RENAMED_FILES_HISTORY="-D off"
291+
else
292+
RENAMED_FILES_HISTORY="-D on"
288293
fi
289294

290295
# OPTIONAL: override depth of scanning for repositories
@@ -815,7 +820,7 @@ CommonInvocation()
815820
${IGNORE_PATTERNS} \
816821
${HISTORY_TAGS} \
817822
${GENERATE_HISTORY} \
818-
${DISABLE_RENAMED_FILES_HISTORY} \
823+
${RENAMED_FILES_HISTORY} \
819824
${SCAN_DEPTH} \
820825
${PROGRESS} \
821826
${OPENGROK_CTAGS:+-c} ${OPENGROK_CTAGS} \
@@ -1053,12 +1058,14 @@ case "${1}" in
10531058
;;
10541059

10551060
indexpart)
1056-
if [ $# -ne 3 ]
1061+
if [ $# -ne 2 ]
10571062
then
10581063
Usage
10591064
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
10621069
ValidateConfiguration
10631070
CreateRuntimeRequirements
10641071
UpdateDataPartial $@

0 commit comments

Comments
 (0)