From: Oleg Broytman Date: Sat, 1 Feb 2020 09:26:38 +0000 (+0300) Subject: Feat(svn): Add script `rdump-load` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=19fd95fb55771bca8065e1bbf1d3292bf16796b8;p=git-scripts.git Feat(svn): Add script `rdump-load` Dump remote Subversion repository and load it into a local one to speed up following `git-svn` operations. --- diff --git a/svn/rdump-load b/svn/rdump-load new file mode 100755 index 0000000..75b12e6 --- /dev/null +++ b/svn/rdump-load @@ -0,0 +1,23 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 svn_url [dir]" >&2 + exit 1 +fi + +url="$1" + +if [ -z "$2" ]; then + dir="`basename $url`" +else + dir="$2" +fi + +if [ -z "$dir" ]; then + echo "Usage: $0 $url dir" >&2 + exit 1 +fi + +svnrdump dump --non-interactive "$url" > "$dir".svndump && +svnadmin create "$dir".svn && +exec svnadmin load "$dir".svn < "$dir".svndump