[SM-Commit] BZR Change 5 to devel sorcery by Andrew Stitt <astitt at sourcemage.org>

bzr at fawkes.sourcemage.org bzr at fawkes.sourcemage.org
Mon Apr 10 11:45:16 EDT 2006


------------------------------------------------------------
revno: 5
committer: Andrew Stitt <astitt at sourcemage.org>
branch nick: devel
timestamp: Sun 2006-04-02 19:16:43 -0700
message:
  fix bug 10183
=== modified file 'ChangeLog'
--- ChangeLog	
+++ ChangeLog	
@@ -1,3 +1,7 @@
+2006-04-02 Andrew Stitt <astitt at sourcemage.org>
+	* dl_handlers/dl_svn: fix bug 10183, allow for username/password to be
+	  passed on the command line
+
 2006-04-02 Andrew Stitt <astitt at sourcemage.org>
 	* build: exclude .bzr metadata
 

=== modified file 'var/lib/sorcery/modules/dl_handlers/dl_svn'
--- var/lib/sorcery/modules/dl_handlers/dl_svn	
+++ var/lib/sorcery/modules/dl_handlers/dl_svn	
@@ -37,16 +37,25 @@
     local URL SVN_ROOT SVN_MODULE SVN_TAG
     url_crack "$url" "$hints"
 
+    local svn_args=""
+    if list_find "$hints" "parse_username" ; then
+      local USER_PASS=$(echo $SVN_ROOT|sed 's#.*//\(.*\)@.*#\1#')
+      local SVN_ROOT=$(echo $SVN_ROOT|sed 's#//\(.*\)@#//#')
+      local USER=${USER_PASS%:*};
+      local PASS=${USER_PASS#*:};
+      svn_args="--username $USER --password $PASS"
+    fi
+
     if test -d $target; then
       message "${MESSAGE_COLOR}Running svn update...${DEFAULT_COLOR}"
-      echo svn update -q --non-interactive -r $SVN_TAG $target
-      svn update -q --non-interactive -r $SVN_TAG $target
+      echo svn update $svn_args -q --non-interactive -r $SVN_TAG $target
+      svn update $svn_args -q --non-interactive -r $SVN_TAG $target
       rc=$?
       eval "$dl_target=\"$target\""
     else
       message "${MESSAGE_COLOR}Running svn checkout...${DEFAULT_COLOR}"
-      echo svn checkout -r $SVN_TAG $SVN_ROOT $SVN_MODULE
-      svn checkout -r $SVN_TAG $SVN_ROOT $SVN_MODULE
+      echo svn checkout $svn_args -r $SVN_TAG $SVN_ROOT $SVN_MODULE
+      svn checkout $svn_args -r $SVN_TAG $SVN_ROOT $SVN_MODULE
       rc=$?
       eval "$dl_target=\"$SVN_MODULE\""
     fi




More information about the SM-Commit mailing list