[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: POST-commit hook issue - Check in works

From: Branko Čibej <brane_at_wandisco.com>
Date: Mon, 10 Feb 2014 07:56:15 +0100

On 10.02.2014 07:53, Branko Čibej wrote:
> On 09.02.2014 23:30, Matt Parks wrote:
>> OK, information on my issue,
>
> ... that went to the wrong list ...
>
>> svn, version 1.6.11 (r934486)
>> compiled Apr 12 2012, 11:02:08
>>
>> COMMIT code works, but post-commit does not. Here is my post commit
>> code:
>>
>> echo "=============================" >> ${LOG}
>> echo "${REPOS_NAME} r${REV} ${DATE} $(${SVN}look author -r ${REV}
>> $REPOS)" >> ${LOG}
>>
>> ##########################
>> ### DO INITIAL CHECKOUT ###
>> ###########################
>> if [ ! -e ${SVN_DEST} ]; then
>> echo "directory ${SVN_DEST} does not exist creating." >> ${LOG}
>> mkdir -vp ${SVN_DEST} >> ${LOG}
>> /usr/bin/whoami >> ${LOG}
>> echo "initial checkout: ${SVN} co --username ${USER} --password
>> ${PASS} -q ${SVN_SRC}${SVN_DEST} " >> ${LOG}
>> ${SVN} co --username ${USER} --password ${PASS} -q
>> ${SVN_SRC} ${SVN_DEST} >> ${LOG} 2>&1
>> if [ ${?} != 0 ]; then
>> echo "checkout: RETRYING" >> ${LOG}
>> rm -rf ${SVN_DEST}
>> ${SVN} co --username ${USER} --password ${PASS} -q
>> ${SVN_SRC} ${SVN_DEST} >> ${LOG} 2>&1
>> if [ ${?} != 0 ]; then
>> echo "checkout: FAILED -- FIXME" >> ${LOG}
>> tail --lines=100 ${LOG} | mail -s "svn checkout:
>> FAILED for ${REPOS_NAME} on ${DATE}" ${ADMINMAIL}
>> > ${LOCKFILE}
>> exit 1
>>
>> Here is the output in my LOG file:
>>
>> =============================
>> <myRepo> r2503 2014-02-09 13:46:34 -0500 <myID>
>> directory /var/svn/svntmp/<myRepo>/build/ does not exist creating.
>> apache -- So this is user that SVN hooks are executed as
>> initial checkout: /usr/bin/svn co --username apache --password *****
>> -q http://svnServer
>
> "apache" is the name of the local user on the server that your HTTPd
> process is running as.

Meh, sent too soon; I was going to add:

There is no connection between this user and the credentials you need to
access your repository. These credentials are defined by the HTTPd
configuration, which you haven't shown; and they don't usually have any
relation to server-local users.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2014-02-10 07:56:52 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.