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

strange reaction from post-commit hook

From: J. Bakshi <joydeep_at_infoservices.in>
Date: Tue, 02 Jun 2009 18:16:09 +0530

Hello list,

My greetings to all of you.

I hope I have joined the right list to discuss with post-commit
problem. I am running a clark-connect ( linux ) server ( kernel
2.6.18-8) with subversion

`````````````````````````````````````````
 svn --version
svn, version 1.4.6 (r28521)
   compiled Dec 31 2007, 15:01:44
``````````````````````````````````````

No problem to crete /add/commit repos through https

I have just decided to use the post-commit hook to automatically
update the sites running on this server when ever there is a commit. and
the problem has started. The apache server is running as apache:apache
(user:group) combination. the repos have the same permission level as
well as the folders under htdocs.

To start the experiment I have created a repo with just a file called
newfile

Here is my post-commit script with 755 permission

```````````````````````````
echo " svn post commit called "
/usr/bin/svn up /var/www/html/POSTCOMMIT
`````````````````````````````````````````

checkout, accepting the certificate permanently etc.... are the initial
stages I have to do. Now after modifying a file when I wanted to commit
; it reported back as

`````````````````````````````````````````````````
Sending newfile
svn: Commit failed (details follow):
svn: Your file or directory 'newfile' is probably out-of-date
svn: The version resource does not correspond to the resource within the
transaction. Either the requested version resource is out of date
(needs to be updated), or the requested version resource is newer than
the transaction root (restart the commit).
``````````````````````````````````````````````````````````

So I deleted the file and updated

```````````````````````````````````````````````````
 rm newfile
rm: remove regular file `newfile'? y

[root_at_192 POSTCOMMIT]# svn up
Restored 'newfile'
U newfile
````````````````````````````````````````````````````

But the newfile get the root:root permission ( as I'm logged in as root)
. So I changed the ownership and permission as I did at the begging (
apache:apache and permisiion 777 )

After modifying the file when I tried to commit it failed :-(

`````````````````````````````
Sending newfile
Transmitting file data .
Committed revision 20.

Warning: 'post-commit' hook failed with error output:
svn: Working copy '/var/www/html/POSTCOMMIT' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

```````````````````````````````````

It repeated again and again even after " svn cleanup". I also tried
" chmod -R 777 .svn" once more but the same error.

If I manually execute the post-commit script; it runs perfectly well
with the echo which I placed inside the script. I am really confused and
no clue why the hook is not called properly. could any one kindly help
me to fix the problem ?

with many thanks

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2358767

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-02 17:01:02 CEST

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.