diff --git a/scripts/clean-source-tree b/scripts/clean-source-tree index a141dbf12..343857c91 100755 --- a/scripts/clean-source-tree +++ b/scripts/clean-source-tree @@ -7,20 +7,10 @@ usage() { exit 1 } -word_in_list() { - local a word=$1 - - shift - for a in "$@"; do - [ "$word" = "$a" ] && return 0 - done - return 1 -} - remove_empty_directories() { find . -depth -type d | sed 's|^\./||' | - grep -Ev '^\.$|^\.svn/|/\.svn/|/\.svn$|^\.hg/|^\.hg$|^\.git/|^\.git$' | + grep -Ev '^\.$|^\.git/|^\.git$' | while read -r d; do for f in "$d"/{*,.*}; do if ! [ -e "$f" ]; then @@ -31,13 +21,11 @@ remove_empty_directories() { done } -exclude=("TAGS") git_options=(-e TAGS) while [ "${1#-}" != "$1" ]; do case "$1" in -x) - exclude+=("$2") git_options+=(-e "$2") shift; shift;; *) @@ -55,14 +43,8 @@ for d in "${@-.}"; do fi git clean -f -d -x "${git_options[@]}" >/dev/null remove_empty_directories - elif [ -e .hg ] || [ -e ../.hg ]; then - if ! type -p hg >&/dev/null; then - echo "$0: hg: not found." - exit 0 - fi - hg purge --all else - echo "$0: $d: not administered by Subversion, Git or Mercurial." + echo "$0: $d: not administered by Git." fi fi ) diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index d61fb1f43..b2fb04118 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -4,7 +4,7 @@ set -o pipefail ############################################################################ # -# Script for converting the SCST source tree as it exists in the Subversion +# Script for converting the SCST source tree as it exists in the Git # repository to a Linux kernel patch. # # Copyright (C) 2008-2020 Bart Van Assche @@ -214,7 +214,7 @@ srpt="true" if [ ! -e scst ] || [ ! -e iscsi-scst ] || [ ! -e srpt ] || [ ! -e scst_local ]; then - echo "Please run this script from inside the SCST subversion source tree." + echo "Please run this script from inside the SCST Git source tree." exit 1 fi diff --git a/scripts/list-non-source-files b/scripts/list-non-source-files index a3b16e953..d2eb707eb 100755 --- a/scripts/list-non-source-files +++ b/scripts/list-non-source-files @@ -2,19 +2,6 @@ export LC_ALL=C -prefix_matches() { - local f - - f="$1" - shift - for s in "$@"; do - if [ "$f" = "$s" ] || [ "${f#"$s/"}" != "$f" ]; then - return 0 - fi - done - return 1 -} - for d in "${@-.}"; do ( cd "$d" && @@ -26,23 +13,6 @@ for d in "${@-.}"; do done while { read -r g; } <&3; do echo "$g"; done exec 3<&- - elif hg branch >&/dev/null; then - subrepos=$(if [ -e .hgsub ]; then sed 's/ = .*//' .hgsub; fi)"" - exec 3< <(find . -type f | cut -c3- | grep -Ev '^$|^\.hg/' | sort) - hg locate | - sort | - while read -r f; do - while { read -r g; } <&3 && [ "$g" '<' "$f" ]; do - if ! prefix_matches "$g" "$subrepos"; then - echo "$g" - fi - done - done - while { read -r g; } <&3; do echo "$g"; done - exec 3<&- - for s in $subrepos; do - $0 "$s" - done else echo "Ignored directory $PWD" fi diff --git a/scripts/list-source-files b/scripts/list-source-files index 139fa1e39..94242d12a 100755 --- a/scripts/list-source-files +++ b/scripts/list-source-files @@ -5,8 +5,7 @@ list_source_files() { d="$(cd "$1" && echo "$PWD")" r="$d" - while [ "$r" != "/" ] && [ ! -e "$r/.git" ] && - [ ! -e "$r/.hg" ]; do + while [ "$r" != "/" ] && [ ! -e "$r/.git" ]; do r="$(dirname "$r")" done @@ -17,14 +16,6 @@ list_source_files() { else echo "Ignored directory $1" >&2 fi - elif [ -e "$r/.hg" ]; then - subdir="${d#"${r}"}" - if [ -n "${subdir}" ]; then - subdir="${subdir#/}/" - hg manifest | sed -n "s|^$subdir||p" - else - hg manifest - fi else ( cd "$d" && diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index c2dab0ed9..8600cf2a2 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -90,7 +90,7 @@ function test_scst_tree_patches { } # Copy the entire SCST source code tree from "$1" into the current directory. -# Only copy those files which are administered by Subversion. +# Only copy files tracked by Git. function duplicate_scst_source_tree { if [ -e "$1/AskingQuestions" ]; then ( set -o pipefail @@ -564,7 +564,7 @@ function run_make_htmldocs { export LC_ALL=C if [ ! -e scst ] || [ ! -e iscsi-scst ] || [ ! -e srpt ]; then - echo "Please run this script from inside the SCST subversion source tree." + echo "Please run this script from inside the SCST Git source tree." exit 1 fi