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

Re: Recover a corrupt repository

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-13 11:41:54 CET

On Dec 13, 2007, at 04:19, Jonathan Ashley wrote:

>> Oh yes. Backing up the just-committed revision in the
>> post-commit hook right after it's been created is a great
>> idea. It's recommended often on this list when people
>> encounter these problems. "svnadmin dump --incremental" used
>> to be the recommendation for these cases.
>> Now that we have "svnsync", that may be easier and/or more useful.
>
> Be *very* careful using svnsync in a post-commit script directly.
> The locking
> method does not really work properly, and if two users commit
> simultaneously,
> the target repository becomes broken. This has happened to me.
>
> I worked around it by writing a small daemon process that listens for
> incoming TCP/IP connections on a port and runs svnsync as a result.
> The post-
> commit hook just makes this connection. That guarantees that only
> one svnsync
> will run at a time.

But... but... but... only one commit can happen at a time. And the
commit is not over until the post-commit script has finished running.
Therefore, if you run svnsync in the post-commit hook, there can
already only be one svnsync process running at a time.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 13 11:42:52 2007

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.