nightly build, scripts: Remove svn support

Remove deprecated svn support.
This commit is contained in:
Gleb Chesnokov
2024-04-26 17:00:51 +03:00
parent f4840e9579
commit 56bb6c0fa6
4 changed files with 10 additions and 47 deletions

View File

@@ -12,11 +12,7 @@
# Returns the revision number of the source files with date $1.
get_revision() {
if svn info . >/dev/null 2>&1; then
svn info -r "{$1}" "${scst_repo}" | sed -n 's/^Revision: //p'
else
git log --before="$1" | head -n 1 | cut -f2 -d ' '
fi
git log --before="$1" | head -n 1 | cut -f2 -d ' '
}
runcmd () {
@@ -54,11 +50,7 @@ usage () {
#----------------------------------------------------------------------------
scst_rootdir="$(dirname "$(dirname "$(cd "$(dirname "$0")" && echo "$PWD")")")"
if svn info . >/dev/null 2>&1; then
scst_repo="$(svn info "$scst_rootdir" | sed -n -e 's|\+ssh://[^@]*@|://|' -e 's/^URL: //p')"
else
scst_repo="$scst_rootdir"
fi
scst_repo="$scst_rootdir"
sendmail_opts=""
run_if_unchanged="false"
@@ -151,13 +143,10 @@ for logfile in old new ; do
# Check out and run the tests.
runcmd ${logfile} \
"Checking out SCST source tree" \
"if svn info . >/dev/null 2>&1; then \
svn co -q -r {${date}} ${scst_repo} ${ABT_TMPDIR}/scst; \
else \
( rmdir ${ABT_TMPDIR}/scst && \
git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \
cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \
fi" &&
"( rmdir ${ABT_TMPDIR}/scst && \
git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \
cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \
" &&
runcmd ${logfile} \
"Running regression tests" \
"cd ${ABT_TMPDIR}/scst && \

View File

@@ -48,16 +48,7 @@ done
for d in "${@-.}"; do
(
if cd "$d"; then
if [ -e .svn ]; then
if ! type -p svn >&/dev/null; then
echo "$0: svn: not found."
exit 0
fi
"$(dirname "$0")"/list-non-source-files |
while read -r f; do
if ! word_in_list "$f" "${exclude[@]}"; then rm -rf -- "$f"; fi;
done
elif [ -e .git ] || [ -e ../.git ]; then
if [ -e .git ] || [ -e ../.git ]; then
if ! type -p git >&/dev/null; then
echo "$0: git: not found."
exit 0

View File

@@ -18,11 +18,7 @@ prefix_matches() {
for d in "${@-.}"; do
(
cd "$d" &&
if [ -e .svn ]; then
svn status --no-ignore |
grep '^[I?] ' |
cut -c8-
elif git branch >&/dev/null; then
if git branch >&/dev/null; then
exec 3< <(find . -type f | cut -c3- | grep -v '^\.git/' | sort)
git ls-tree -r HEAD | cut -f2 -d' ' | sort |
while read -r f; do

View File

@@ -5,25 +5,12 @@ list_source_files() {
d="$(cd "$1" && echo "$PWD")"
r="$d"
while [ "$r" != "/" ] && [ ! -e "$r/.svn" ] && [ ! -e "$r/.git" ] &&
while [ "$r" != "/" ] && [ ! -e "$r/.git" ] &&
[ ! -e "$r/.hg" ]; do
r="$(dirname "$r")"
done
if [ -e "$r/.svn" ]; then
(
cd "$d" || exit $?
svn status -v | \
grep -vE '^[D?]|^Performing|^$' | \
cut -c3- | \
while read -r a b c f; do
if [ -f "$f" ] || [ -h "$f" ]; then
echo "$a $b $c" >/dev/null
echo "$f"
fi
done
)
elif [ -e "$r/.git" ]; then
if [ -e "$r/.git" ]; then
subdir="${d#"${r}"}"
if [ "$r" != "" ]; then
( cd "$d" && git ls-tree --name-only -r HEAD ) | sed "s|^$subdir/||"