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

Re: Loosing local changes during a commit

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-03-17 18:42:59 CET

On Wed, 2004-03-17 at 11:32, Folker Schamel wrote:
> Hello!
>
> I suppose this is nothing new, but I couldn't find
> any discussion about this topic yet:
> When changing a file while committing,
> you may loose these local changes

When you run 'svn commit', the locally modified file is copied to
.svn/tmp/, and then the tmpfile is sent to the repository.

What you've done in your experiment below is to create a race
condition. You have one process trying to copy the file, while the
other process edits the file. Of course it's nondeterministic as to
"how much" data gets copied. What do you expect?

There's nothing that can be done here. Even if we weren't copying the
working file to .svn/tmp/, and simply sending the working file directly
to the server, you'd have the exact same race condition.

If you run 'svn commit', you're telling the client to send your file to
the server. If you change the file while it's trying to do that, then
you're doing something very bad. 'svn commit' is not meant to be, nor
can it be, parallizable. There's nothing to fix here.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 17 18:43:33 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.