[Lunar-commits] CVS: moonbase/devel/subversion/plugin.d download-svn.plugin, 1.1, 1.2

Moritz Heiber moe at lunar-linux.org
Wed Apr 6 08:14:35 UTC 2005


Update of /var/cvs/lunar/moonbase/devel/subversion/plugin.d
In directory espresso.foo-projects.org:/tmp/cvs-serv8314/plugin.d

Modified Files:
	download-svn.plugin 
Log Message:
I'm teh awesome

1) Added https and svn+ssh support to the svn plugin
   (note: svn+ssh is a <method>+<tunnel> notation; for further
   input go'n dig up the svn cookbook)
2) Made the verbose message about the update treshold a regular
   message. Otherwise the regular user wouldn't see anything
   at all. Applied a temporary color hack since MESSAGE_COLOR
   is broken (Defined two times currently)
3) Made sofar's day AGAIN .. :p


Index: download-svn.plugin
===================================================================
RCS file: /var/cvs/lunar/moonbase/devel/subversion/plugin.d/download-svn.plugin,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- download-svn.plugin	30 Mar 2005 10:49:26 -0000	1.1
+++ download-svn.plugin	6 Apr 2005 08:14:32 -0000	1.2
@@ -12,11 +12,12 @@
 # valid SVN urls are:
 # svn://
 # svn+http:// (will be transformed to http://)
-
+# svn+https:// (will be transformed to https://)
+# svn+ssh://
 
 plugin_source_download_svn() {
   # check if we can handle this URL format
-  if [ "${1:0:6}" != "svn://" -a "${1:0:11}" != "svn+http://" ] ; then
+  if [ "${1:0:6}" != "svn://" -a "${1:0:11}" != "svn+http://" -a "${1:0:12}" != "svn+https://" -a "${1:0:10}" != "svn+ssh://" ] ; then
     return 2
   fi
   debug_msg "plugin_source_needrefresh_svn($@)"
@@ -29,11 +30,15 @@
 
   SVN_URL=$(echo $1 | cut -d: -f1-2)
   SVN_DIR=$(echo $1 | cut -d: -f3)
-  # translate svn+http urls:
+  # translate svn+http(s) urls:
   if [ "${SVN_URL:0:11}" == "svn+http://" ]; then
     SVN_URL="http://${SVN_URL:11}"
   fi
 
+  if [ "${SVN_URL:0:12}" == "svn+https://" ]; then
+    SVN_URL="https://${SVN_URL:12}"
+  fi
+
   message  "${MESSAGE_COLOR}Downloading SVN module for" \
  	   "module ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
 
@@ -81,7 +86,7 @@
     # pack in last component dir of $SVN_DIR
     tar cjf $2 $SVN_DIR
   else
-    activity_log "lget"  "$MODULE"  "$VERSION"  "failed" "Could not get $1"
+    activity_log "lget"  "$MODULE"  "$VERSION"  "failed" "Could not fetch $1"
   fi
 
   cd $TMPDIR
@@ -92,7 +97,7 @@
 
 plugin_source_needrefresh_svn() {
   # check if we can handle this URL format
-  if [ "${1:0:6}" != "svn://" -a "${1:0:11}" != "svn+http://" ] ; then
+  if [ "${1:0:6}" != "svn://" -a "${1:0:11}" != "svn+http://" -a "${1:0:12}" != "svn+https://" -a "${1:0:10}" != "svn+ssh://" ] ; then
     return 2
   fi
   debug_msg "plugin_source_needrefresh_svn($@)"
@@ -107,7 +112,7 @@
       # it is older:
 	  return 0
 	else
-      verbose_msg "SVN update not required for \"$2\" (less than $SVN_THRESHOLD mins old)"
+      message "${MESSAGE_COLOR}SVN update not required for \"${FILE_COLOR}$(basename $2)${DEFAULT_COLOR}${CYAN}\" (less than $SVN_THRESHOLD minutes old)${DEFAULT_COLOR}"
       # now we can send a FAIL so the next plugins are skipped:
 	  return 1
     fi



More information about the Lunar-commits mailing list