You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Matt Parks <mp...@empowersis.com> on 2014/02/09 23:30:16 UTC

POST-commit hook issue - Check in works

OK, information on my issue,

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/svn/<myRepo>/trunk/wwwroot/ /var/svn/svntmp/<myRepo>/build/
svn: OPTIONS of 'http://svnServer/svn/<myRepo>/trunk/wwwroot': could not 
connect to server (http://svnServer)
checkout: RETRYING
svn: OPTIONS of 'http://svnServer/svn/<myRepo>/trunk/wwwroot': could not 
connect to server (http://svnServer)
checkout: FAILED -- FIXME

No Proxy server is being used or in the way.

This was working, I attempted to add LDAP and had no luck getting it to 
work.  I have rolled back code and at this point I have tried so many 
things that I am not able to get it working again and my team will be in 
tomorrow and need this to work.

I need some suggestions and some time away from issue.  Lost sleep 
attempting to correct.

Please help.

Thanks

Matthew C. Parks



Re: POST-commit hook issue - Check in works

Posted by Ben Reser <be...@reser.org>.
On 2/9/14, 2:30 PM, Matt Parks wrote:
> This was working, I attempted to add LDAP and had no luck getting it to work.
>  I have rolled back code and at this point I have tried so many things that I
> am not able to get it working again and my team will be in tomorrow and need
> this to work.
> 
> I need some suggestions and some time away from issue.  Lost sleep attempting
> to correct.
> 
> Please help.

First of all support requests like this really belong on
users@subversion.apache.org as per:
http://subversion.apache.org/docs/community-guide/mailing-lists.html#where-to-post

Second of all there is insufficient info to be of any help to you.  You should
determine why you can't connect to the server.  I'd guess probably some issue
with your server, networking environment or the URL you're using for the checkout.

My suggestion would be to include more information in your post and send it to
users@subversion.apache.org.  There are far more people there that respond to
support queries there than there are here on this list.  A critical question
for you to answer in your updated post is to explain what you've tried to
resolve the issue.

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

Re: POST-commit hook issue - Check in works

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