Skip to main content

Thread: SVN checkingout


good afternoon,

have process svn repositories held in /var/svn/[domain]. have set-up post-commit hook automatically checkout repository development site , delete .svn directories recursively through-out.

intend run bash script (as below); problem lies. every repository "open" , can read, write , commit repository, secure via http authentication, using htpasswd.

because hook automatic, able collect current user/password don't think it's possible have created account system called "svnroot" password.

how can authenticate through http authentication via bash script?

code:
sudo sv_checkout -s mysite.com
code:
#!/bin/bash -x # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # checkout repository # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  usage() { cat << eof usage: $0 options  script checkout repository development.  options:    -s   site/repository.    -u   user checking out.    -p   theuser password. eof }  if [ "$1" == "?" ];         usage         exit fi  # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  sh_dir_dev="/var/www/"  # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  user_name="svnroot" user_pwd="r%7p4$5w0rd!"  while getopts ":s:up" opt;         case ${opt} in                 s) domain_name=${optarg} ;;                 u) user_name=${optarg} ;;                 p) user_pwd=${optarg} ;;                 *)                         echo "invalid option: -${opt} ${optarg}"                         exit 1                 ;;         esac done  if [[ -z "${domain_name}" ]] || [[ -z "${user_name}" ]] || [[ -z "${user_pwd}" ]];         usage         exit fi  if [ ! -e "${sh_dir_dev}${domain_name}" ];         echo "domain name ${domain_name} not exist, aborting."         exit fi  echo "checking out repository..." svn checkout http://svn.${domain_name} ${sh_dir_dev}${domain_name}/dev  echo "updating ownership , mode..." chown -r www-data:www-data ${sh_dir_dev}${domain_name}/dev  echo "clearing cache directories..." rm -fr `find ${sh_dir_dev}${domain_name}/dev -type d -name .svn`
thanks in advance,
ash

quote posted h3110 view post
i have process svn repositories held in /var/svn/[domain]. have set-up post-commit hook automatically checkout repository development site , delete .svn directories recursively through-out.
you should check out export command svn. clean (read: no .svn folders) checkout of repository.

code:
svn export --help export: create unversioned copy of tree. usage: 1. export [-r rev] url[@pegrev] [path]        2. export [-r rev] path1[@pegrev] [path2]
as actual problem: prompting enter svn password? if automate entry of password using expect.

see: http://www.linux.com/archive/feed/56066


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] SVN checkingout


Ubuntu

Comments