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

RE: How to run post-commit as a backgorund process??

From: Shalinda Adikari <SAdikari_at_virtusa.com>
Date: Thu, 7 Jan 2010 15:55:39 +0530

Hi Didier,

Thanks for your quick reply. It's really great.

While going through some of the forums, I found following command to do the task.
$SVNSYNC synchronize URL_TO_MIRROR_REPO --username=svnsync --password=svnsyncpassword >/dev/null 2>/dev/null &

But this solution is rather different to yours one. As you mention in your reply what is the use of having two "&" instead of one "&"??


Kind Regards,
Shalinda


-----Original Message-----
From: Didier Trosset [mailto:didier_trosset_at_agilent.com]
Sent: Thursday, January 07, 2010 3:40 PM
To: users_at_subversion.apache.org
Cc: Shalinda Adikari
Subject: Re: How to run post-commit as a backgorund process??

Shalinda Adikari wrote:
> Hi Team,
>
> I’m working on svn mirroring capability and I have following issue when
> it is used.
>
> Once *svnsync* is configured It takes longer time than normal commit.
> Simply if we can commit a file within 2s without svnsync mirroring , now
> it takes nearly 6s. Therefore, I need to reduce the time gap by
> executing svnsync command parallel. According to the svn help files we
> are normally to executing svnsync using the post-commit hook. However,
> if we can run svnsync as a background process without effecting to
> normal commit then user would not see any time lag.

In your post-commit script, you should start the commands without waiting
for their completion. Additionally, you should redirect the outputs of the
command, otherwise the script will also wait for the commands to finish.

You can do this as follows:

   command-to-run >/dev/null 2>&1 &

HTH
Didier

>
> I hope you can help me to find a solution for this issue.
>
>
>
> Thanks,
>
> Shalinda
>
> ---------------------------------------------------------------------------------------------
>
> This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.
>
> ---------------------------------------------------------------------------------------------
>



---------------------------------------------------------------------------------------------

This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.

---------------------------------------------------------------------------------------------
Received on 2010-01-07 11:26:45 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.