diff --git a/scripts/import-from-svn/import-from-svn.sh b/scripts/import-from-svn/import-from-svn.sh index 06b45c65..63135495 100755 --- a/scripts/import-from-svn/import-from-svn.sh +++ b/scripts/import-from-svn/import-from-svn.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Copyright (c) 2019 Patryk Obara +# SPDX-License-Identifier: GPL-2.0-or-later + +# Import script suitable for SVN repositories using standard layout. +# Uses git-svn to download whole history, converts svn tag paths to git tags, +# filters repo and removes temporary git refs. + readonly svn_url=https://svn.code.sf.net/p/dosbox/code-0/dosbox echo_err () { @@ -33,10 +40,10 @@ git_svn_clone_dosbox () { "$svn_url" \ "$repo_name" - local -r authors_file=$PWD/svn-dosbox-authors + local -r authors_prog=$PWD/svn-authors-prog.sh git -C "$repo_name" svn fetch \ --use-log-author \ - --authors-file="$authors_file" + --authors-prog="$authors_prog" } # Remove UUID of SVN server to avoid issues in case SourceForge will change @@ -105,6 +112,13 @@ cleanup () { git -C "$1" branch -D master } +# Set up remote repo to prepare for push +# +setup_remote () { + git -C "$1" remote add dosbox-staging git@github.com:dreamer/dosbox-staging.git + git -C "$1" fetch dosbox-staging +} + # main # main () { @@ -118,6 +132,7 @@ main () { name_active_branches "$repo" import_svn_tagpaths_as_git_tags "$repo" cleanup "$repo" + setup_remote "$repo" } main "$@" diff --git a/scripts/import-from-svn/import-svn-ignore.sh b/scripts/import-from-svn/import-svn-ignore.sh index 9e5c473d..7ce84457 100755 --- a/scripts/import-from-svn/import-svn-ignore.sh +++ b/scripts/import-from-svn/import-svn-ignore.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2019 Patryk Obara +# SPDX-License-Identifier: GPL-2.0-or-later + readonly svn_url=https://svn.code.sf.net/p/dosbox/code-0/dosbox list_directories () { diff --git a/scripts/import-from-svn/svn-authors-prog.sh b/scripts/import-from-svn/svn-authors-prog.sh new file mode 100755 index 00000000..7a835adc --- /dev/null +++ b/scripts/import-from-svn/svn-authors-prog.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +readonly user=$1 + +format_author () { + echo "$1 <$user@users.sourceforge.net>" +} + +case $user in + qbix79) format_author "Peter Veenstra" ;; + harekiet) format_author "Sjoerd van der Berg" ;; + finsterr) format_author "Ulf Wohlers" ;; + canadacow) format_author "Dean Beeler" ;; + yot) format_author "Felix Jakschitsch" ;; + c2woody) format_author "Sebastian Strohhäcker" ;; + h-a-l-9000) format_author "Ralf Grillenberger" ;; + ripsaw8080) format_author "ripsaw8080" ;; + uid83799) format_author "uid83799" ;; +esac diff --git a/scripts/import-from-svn/svn-dosbox-authors b/scripts/import-from-svn/svn-dosbox-authors deleted file mode 100644 index a7cb6486..00000000 --- a/scripts/import-from-svn/svn-dosbox-authors +++ /dev/null @@ -1,9 +0,0 @@ -qbix79 = Peter Veenstra -harekiet = Sjoerd van der Berg -finsterr = Ulf Wohlers -canadacow = Dean Beeler -yot = Felix Jakschitsch -c2woody = Sebastian Strohhäcker -h-a-l-9000 = Ralf Grillenberger -ripsaw8080 = ripsaw8080 -uid83799 = uid83799