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

Loosing local changes during a commit

From: Folker Schamel <schamel23_at_spinor.com>
Date: 2004-03-17 18:32:06 CET

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.
This happend to me, because sometimes I have commits
needing 20 minutes or more (due to pre-commit scripts),
so I continue working while committing.

For a sample how to reproduce this (win32) see below.
Note that the output of "type myfile.txt" lacks
the lines 694 to 1077.

Probably this is not a bug in the strict sense
(re: "you shouldn't modify a file while committing!").
But somehow it is ugly...
Maybe there is a way to avoid this? For example,
setting the files to read-only during a commit?

Question:
Why is the working copy file modified at all?

Cheers,
Folker

***

C:\temp\svntest>svnadmin create repo

C:\temp\svntest>svn checkout file:///temp/svntest/repo wc
Checked out revision 0.

C:\temp\svntest>cd wc

C:\temp\svntest\wc>echo mytext >myfile.txt

C:\temp\svntest\wc>svn add myfile.txt
A myfile.txt

C:\temp\svntest\wc>start svn commit -m "" | for /L %i in (1,1,10000) do echo change %i >>myfile.txt
C:\temp\svntest\wc>echo change 1 1>>myfile.txt

C:\temp\svntest\wc>echo change 2 1>>myfile.txt

C:\temp\svntest\wc>echo change 3 1>>myfile.txt

<snip>

C:\temp\svntest\wc>echo change 9998 1>>myfile.txt

C:\temp\svntest\wc>echo change 9999 1>>myfile.txt

C:\temp\svntest\wc>echo change 10000 1>>myfile.txt

C:\temp\svntest\wc>type myfile.txt
mytext
change 1
change 2
change 3
<snip>
change 691
change 692
change 693
change 1077
change 1078
change 1079
<snip>
change 9998
change 9999
change 10000

C:\temp\svntest\wc>svn cat file:///temp/svntest/repo/myfile.txt
mytext
change 1
change 2
change 3
<snip>
change 691
change 692
change 693

C:\temp\svntest\wc>

***

---------------------------------------------------------------------
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:32:21 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.