You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Branko Čibej <br...@wandisco.com> on 2014/02/10 07:53:45 UTC

Re: POST-commit hook issue - Check in works

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.


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: POST-commit hook issue - Check in works

Posted by Branko Čibej <br...@wandisco.com>.
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@wandisco.com