From 83e10bcfe690df5e37efb941fa5b32338ab88a10 Mon Sep 17 00:00:00 2001 From: Daniel Demiss Date: Tue, 3 Apr 2012 18:49:29 +0200 Subject: [PATCH 1/2] Fixed the regular expression and changed building of the local_directory to support fixed revisions at custom destinations --- git-svn-clone-externals | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-svn-clone-externals b/git-svn-clone-externals index d6896f8..8776d4d 100755 --- a/git-svn-clone-externals +++ b/git-svn-clone-externals @@ -97,11 +97,11 @@ function is_excluded() git svn show-externals|grep -vE '#|^$'| \ - sed 's/\(-r\)[ ]*\([0-9]\{1,\}\)/\1\2/'|while read -a words + sed 's/\([a-zA-Z_\.\-]*\)[ ]*\(-r\)[ ]*\([0-9]\{1,\}\)/\1 \2\3/'|while read -a words do [ -z "${words[*]}" ] && continue - local_directory="$(echo ${words[0]}|sed 's,^/,,')" + local_directory="$(echo ${words[0]}${words[3]}|sed 's,^/,,')" revision="" remote_url="${words[1]}" From 48d9072d87324617434c7d3911e6835bd3766e62 Mon Sep 17 00:00:00 2001 From: Daniel Demiss Date: Tue, 3 Apr 2012 19:10:08 +0200 Subject: [PATCH 2/2] Improved the regexp for the directory name to match any sequence of non-whitespace characters and made the separator match any type of whitespace --- git-svn-clone-externals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-svn-clone-externals b/git-svn-clone-externals index 8776d4d..3b06017 100755 --- a/git-svn-clone-externals +++ b/git-svn-clone-externals @@ -97,7 +97,7 @@ function is_excluded() git svn show-externals|grep -vE '#|^$'| \ - sed 's/\([a-zA-Z_\.\-]*\)[ ]*\(-r\)[ ]*\([0-9]\{1,\}\)/\1 \2\3/'|while read -a words + sed 's/\(\S*\)\s*\(-r\)\s*\([0-9]\{1,\}\)/\1 \2\3/'|while read -a words do [ -z "${words[*]}" ] && continue