scripts: Remove non-Git VCS support

Mercurial branches remain in source-listing and cleanup helpers after
Subversion support was retired. SCST development now uses Git.

Remove Mercurial detection and commands together with stale Subversion
wording. Preserve the existing no-VCS source-list fallback and all Git
behavior.
This commit is contained in:
Gleb Chesnokov
2026-08-21 19:58:59 +03:00
parent 0aa6689c3a
commit 1a1a75d9ed
5 changed files with 7 additions and 64 deletions
+2 -20
View File
@@ -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
)