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

Re: [PATCH] Allow to made multible backup from same version

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2002-12-16 00:32:19 CET

On 15 Dec 2002, Philip Martin wrote:

> I don't understand why one would want multiple backups of the same
> revison, particularly if they are in directories with arbitrary names.
>

Good question. =)

But If I run manually hot-backup.py, I want that it will made a backup to
me, regardless if there is already one or not.

> However looking at the patch I see a race in the existing code when
> used a a post-commit hook. A post-commit script runs asynchronously,
> so it cannot assume that the repository has not changed since the
> commit that triggered the script. Consider the following
>
> 1. Commit X completes and triggers the 'X' run of the post-commit.
> 2. Commit Y completes and triggers the 'Y' run of the post-commit.
> 3. The 'X' post-commit starts.
> 4. The 'Y' post-commit starts.
> 5. The 'X' post-commit completes, but backs-up Y since that HEAD.
> 6. The 'Y' post-commit will now do
> shutil.copytree(repo_dir, backup_subdir)
> but backup_subdir already exists and contains a backup of Y.
>

So, the script should be modified to use passed new revision nro by
post-commit, at least? Then it would made backup of wrong version, but it
will not fail.

Is this the only solution? IMHO, it would not made sense block incoming
commits during backup operation. Is there even any way to do this?

There is no way to made hot-backup of spesified version, isn't?

BR, Jani

--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 16 00:33:03 2002

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