aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-01-19 17:05:18 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-01-19 17:05:18 +0000
commit46c7ff331677e4f4250b0139d40a8f6a3e688e9b (patch)
tree296a6622c99056ef11721d44384e05bd4fee5bc9 /trunk/lib
parenta7c1d928d99d847007ca5e2f4d5bb093e9373bef (diff)
downloadsimplepkg-46c7ff331677e4f4250b0139d40a8f6a3e688e9b.tar.gz
simplepkg-46c7ff331677e4f4250b0139d40a8f6a3e688e9b.tar.bz2
fix on repository_import
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@760 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 40306b7..d75c6a3 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -958,7 +958,7 @@ function repository_import {
# import a folder into a subversion repository
# usage: repository_import <folder> <repository>
- local folder="$1" oldfolder
+ local folder="$1" oldfolder tmpfile
local repository="$2" repository_type repository_path
if [ ! -d "$folder" ] || [ -z "$repository" ]; then
@@ -996,7 +996,16 @@ function repository_import {
fi
echo "Importing files from $folder into $repository..."
- su_svn import $folder $repository -m "initial import"
+ if tmpfile=`mktemp $TMP/simplepkg_import.XXXXXX`; then
+ echo "initial import" > $tmpfile
+ chmod +r $tmpfile
+ su_svn import $folder $repository -F $tmpfile
+ rm -f $tmpfile
+ else
+ EXIT_CODE="1"
+ return $EXIT_CODE
+ fi
+
if [ "$?" == "0" ]; then
echo "Making $folder a working copy of $repository..."
oldfolder="$(mktemp -d $(echo $folder | sed -e 's/\/*$//g').XXXXXX)"