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

Re: post-commit : automation

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Sat, 6 Jun 2009 17:39:01 -0500

On Jun 6, 2009, at 06:00, Dextrous wrote:

> On Sat, Jun 6, 2009 at 2:49 PM, Ashwin Patil wrote:
>> I am trying to automate some processes through the post-commit
>> file invoke,
>> Everything is working fine but I want it to be run in the
>> background so
>> that the SVN client need not wait to complete the process and but
>> should
>> complete the commit and exit.
>> Basically I have a shell script say "/usr/local/bin/
>> archive_process" and
>> want it to be invoke through the post-commit when a particular
>> repository
>> commits. All it is working fine but the client is exiting with an
>> error
>> "time out error" as the "/usr/local/bin/archive_process" takes
>> long time to
>> complete process and exit. But however commit completes properly.
>> I tried by adding the "&" at the end of the "/usr/local/bin/
>> archive_process"
>> in the post-commit file but no help.
> exit 0 should solve the problem

I don't think so; that should already be the default.

I suspect the problem is rather that you need to close the stdout and
stderr file handles. Otherwise the client is waiting for output to
possibly appear. This has been mentioned on this list before. Try:


/usr/bin/sudo /usr/local/bin/archive_process $REPO $REV >/dev/null 2>/
dev/null &

-----------------------------end of file

Also, be aware that multiple archive_process processes could now be
running simultaneously, if multiple commits happen in quick
succession. Make sure archive_process will function correctly in
these situations.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-07 00:40:09 CEST

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