summaryrefslogtreecommitdiffstats
path: root/patch_for_svn_https.patch
blob: 58642905789e9236671d4243383ddd08fd3c5280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff -Nru modules/dl_handlers/dl_svn /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/dl_handlers/dl_svn
--- modules/dl_handlers/dl_svn	2005-11-01 15:26:01.000000000 +0100
+++ /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/dl_handlers/dl_svn	2006-01-11 12:04:43.000000000 +0100
@@ -44,9 +44,23 @@
       eval "$dl_target=\"$target\""
     else
       message "${MESSAGE_COLOR}Running svn checkout...${DEFAULT_COLOR}"
-      # hard-coded http :-(
-      svn checkout -r $SVN_TAG http://$SVN_ROOT $SVN_MODULE
-      rc=$?
+      # hard-coded http :-( ....
+      case $SVN_TYPE in
+      	 svn) 
+		message "svn checkout -r $SVN_TAG http://$SVN_ROOT $SVN_MODULE"
+		svn checkout -r $SVN_TAG http://$SVN_ROOT $SVN_MODULE 
+      		rc=$?
+	   ;;
+	svns)
+		message "svn checkout -r $SVN_TAG https://$SVN_ROOT $SVN_MODULE"
+		svn checkout -r $SVN_TAG https://$SVN_ROOT $SVN_MODULE 
+      		rc=$?
+	   ;;
+	   *) 
+	   	message "unknow url type"
+		rc=2
+	   ;;
+      esac
       eval "$dl_target=\"$SVN_MODULE\""
     fi
     [[ $rc == 0 ]] && break
diff -Nru modules/libdownload /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/libdownload
--- modules/libdownload	2005-11-01 15:26:10.000000000 +0100
+++ /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/libdownload	2006-01-11 12:04:43.000000000 +0100
@@ -75,6 +75,11 @@
   local dl_target=$5
   local dl_type=$6

 
+  if [ "$handler" == "svns" ]
+  then
+  	local handler=svn
+  fi
+
   if ! [[ "$handler" ]] ; then
     message "Missing handler, this is probably a sorcery bug"
     return 255
diff -Nru modules/url_handlers/url_svn /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/url_handlers/url_svn
--- modules/url_handlers/url_svn	2005-11-01 15:26:13.000000000 +0100
+++ /home/puppetmaster/code/sorcery/var/lib/sorcery/modules/url_handlers/url_svn	2006-01-11 12:04:43.000000000 +0100
@@ -68,11 +68,17 @@
 ## @Global SVN_ROOT
 ## @Global SVN_MODULE
 ## @Global SVN_TAG
-##
+## @Global SVN_TYPE
 #---------------------------------------------------------------------
 function url_svn_crack() { 
 
-  URL=`url_strip_prefix "$1" svn`
+  SVN_TYPE=`echo $1 | cut -d ':' -f 1`
+  if [ "$SVN_TYPE" == "svns" ]
+  then
+  	URL=`url_strip_prefix "$1" svns`
+  else
+  	URL=`url_strip_prefix "$1" svn`
+  fi
   SVN_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"`
   local SVN_MODULE_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
   SVN_MODULE=`echo $SVN_MODULE_TAG | cut -d : -f2`