]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fix on repository_import
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 19 Jan 2009 17:05:18 +0000 (17:05 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 19 Jan 2009 17:05:18 +0000 (17:05 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@760 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh

index 40306b77956264cc5ac68cfedbb080d785cfc1fd..d75c6a3c1798209c77777a9f9bf891e3ad82c139 100644 (file)
@@ -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)"