From: Gleb C. <lna...@ya...> - 2024-05-02 14:20:33
|
Commit: 56bb6c0 GitHub URL: https://github.com/SCST-project/scst/commit/56bb6c0fa6726befb8057f28af04af7c81d5bd8b Author: Gleb Chesnokov Date: 2024-05-02T17:20:01+03:00 Log Message: ----------- nightly build, scripts: Remove svn support Remove deprecated svn support. Modified Paths: -------------- nightly/bin/nightly | 23 ++++----------- scripts/clean-source-tree | 11 +------ scripts/list-non-source-files | 6 +--- scripts/list-source-files | 17 ++--------- 4 files changed, 10 insertions(+), 47 deletions(-) =================================================================== diff --git a/nightly/bin/nightly b/nightly/bin/nightly index 9173eea..9034d0b 100755 --- a/nightly/bin/nightly +++ b/nightly/bin/nightly @@ -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 && \ diff --git a/scripts/clean-source-tree b/scripts/clean-source-tree index a41d41e..a141dbf 100755 --- a/scripts/clean-source-tree +++ b/scripts/clean-source-tree @@ -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 diff --git a/scripts/list-non-source-files b/scripts/list-non-source-files index 7b3a314..d656886 100755 --- a/scripts/list-non-source-files +++ b/scripts/list-non-source-files @@ -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 diff --git a/scripts/list-source-files b/scripts/list-source-files index 56e3f1c..139fa1e 100755 --- a/scripts/list-source-files +++ b/scripts/list-source-files @@ -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/||" |