|
From: <za...@us...> - 2006-03-21 01:56:20
|
Revision: 12 Author: zaufi Date: 2006-03-20 17:56:14 -0800 (Mon, 20 Mar 2006) ViewCVS: http://svn.sourceforge.net/halfs/?rev=12&view=rev Log Message: ----------- implement SVN support Modified Paths: -------------- admin/trunk/devel.d/01-echo.sh admin/trunk/devel.d/vcs-cvs-support.sh admin/trunk/devel.d/vcs-subversion-support.sh Modified: admin/trunk/devel.d/01-echo.sh =================================================================== --- admin/trunk/devel.d/01-echo.sh 2006-03-18 01:21:35 UTC (rev 11) +++ admin/trunk/devel.d/01-echo.sh 2006-03-21 01:56:14 UTC (rev 12) @@ -1,6 +1,6 @@ #!/bin/bash # -# $Id: 01-echo.sh,v 1.5 2006/03/17 14:31:00 alex Exp $ +# $Id: 01-echo.sh,v 1.6 2006/03/20 16:29:14 alex Exp $ # RES_COL=${COLUMNS:-0} @@ -79,7 +79,10 @@ spammed_lines=$((spammed_lines+1)) fi } - +# +# \todo It seems that we need to take care about line length we want to print +# to correct outputed lines counting... +# function eerror() { inc_lines_printed Modified: admin/trunk/devel.d/vcs-cvs-support.sh =================================================================== --- admin/trunk/devel.d/vcs-cvs-support.sh 2006-03-18 01:21:35 UTC (rev 11) +++ admin/trunk/devel.d/vcs-cvs-support.sh 2006-03-21 01:56:14 UTC (rev 12) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: vcs-cvs-support.sh,v 1.3 2006/03/16 23:53:01 alex Exp $ +# $Id: vcs-cvs-support.sh,v 1.4 2006/03/20 16:29:14 alex Exp $ # # VCS support module for CVS # @@ -36,7 +36,7 @@ function vcs_tag() { tag=$1 - test -z "${tag}" && eerror "No tag given to VCS driver" + test -z "${tag}" && eerror "No tag given to VCS driver" && eend 1 1 cmd="cvs -q tag "${tag}" >> ${log} 2>&1" if test -n "${DEBUG_DEVEL_SH}"; then einfo "${cmd}" @@ -51,7 +51,7 @@ function vcs_branch() { tag=$1 - test -z "${tag}" && eerror "No tag given to VCS driver" + test -z "${tag}" && eerror "No tag given to VCS driver" && eend 1 1 cmd="cvs -q tag -b "${tag}" >> ${log} 2>&1" if test -n "${DEBUG_DEVEL_SH}"; then einfo "${cmd}" Modified: admin/trunk/devel.d/vcs-subversion-support.sh =================================================================== --- admin/trunk/devel.d/vcs-subversion-support.sh 2006-03-18 01:21:35 UTC (rev 11) +++ admin/trunk/devel.d/vcs-subversion-support.sh 2006-03-21 01:56:14 UTC (rev 12) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: vcs-subversion-support.sh,v 1.3 2006/03/17 14:13:38 alex Exp $ +# $Id: vcs-subversion-support.sh,v 1.4 2006/03/20 16:29:14 alex Exp $ # # VCS support module for Subversion # @@ -15,14 +15,49 @@ current_vcs_message="$*" } +function svn_get_info() +{ + svn_rep_root=`svn info | grep '^Repository Root' | sed 's,.*: \(.*\),\1,'` + svn_mod_root=`svn info | grep '^URL' | sed 's,.*: \(.*\),\1,'` + svn_module_name=`echo "${svn_mod_root}" | sed -e "s,${svn_rep_root},," -e 's,^/\([^/]\+\)/.*,\1,'` +} + function vcs_commit() { + msg="${current_vcs_message}" + test -z "${msg}" && msg="<no message>" + cmd="svn commit -m '$msg' $* >> ${log} 2>&1" + if test -n "${DEBUG_DEVEL_SH}"; then + einfo "${cmd}" + else + eval ${cmd} + fi } function vcs_tag() { + tag=$1 + test -z "${tag}" && eerror "No tag given to VCS driver" eend 1 1 + svn_get_info + tag_url="${svn_rep_root}/${svn_module_name}/tags/${tag}" + cmd="svn copy "${svn_mod_root}" "${tag_url}" >> ${log} 2>&1" + if test -n "${DEBUG_DEVEL_SH}"; then + einfo "${cmd}" + else + eval ${cmd} + fi } function vcs_branch() { + tag=$1 + test -z "${tag}" && eerror "No tag given to VCS driver" eend 1 1 + svn_get_info + branch_url="${svn_rep_root}/${svn_module_name}/branches/${tag}" + cmd="svn copy "${svn_mod_root}" "${branch_url}" >> ${log} 2>&1" + if test -n "${DEBUG_DEVEL_SH}"; then + einfo "${cmd}" + else + eval ${cmd} + fi } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |