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

Misinforming the user on rename with local changes

From: François Beausoleil <fbeausoleil_at_ftml.net>
Date: 2004-11-11 15:40:51 CET

Hi !

Thomas Hallgren over on the user's list has brought up a case that might
result in partial dataloss:
http://svn.haxx.se/users/archive-2004-11/0434.shtml

The use case is as follows:
Quoting Thomas Hallgren:
> Bob checks out a project.
> Bob edits the file foo.txt.
>
> Bill checks out the same project (and version) as Bob.
> Bill moves the foo.txt to directory bar.
> Bill makes some changes to bar/foo.txt.
> Bill commits his changes.
>
> Bob commits his changes.

I wrote a reproduction recipe, at
http://svn.haxx.se/users/archive-2004-11/0502.shtml

The reproduction recipe:
rd /s/q repos wc-bob wc-tim
cls
svn --version
svnadmin create repos --fs-type=fsfs
svn checkout file:///repos wc-bob
cd wc-bob
md lib
echo >lib\file.txt
svn add lib
svn commit -m "Bob's first edit"
cd ..
svn checkout file:///repos wc-tim
cd wc-tim
svn mkdir libcomplex
svn move lib\file.txt libcomplex
svn commit --message "Moving files around, just for fun"
cd ..\wc-bob
echo "having made some edits, I'm willing to bet" >lib\file.txt
svn commit -m "Committing Bob's conflicting change"
svn update
svn status

The results of the last three commands:

$ svn commit -m "Committing Bob's conflicting change"
Sending lib\file.txt
svn: Commit failed (details follow):
svn: File not found: transaction '2-1', path '/lib/file.txt'

$ svn update
D lib\file.txt
A libcomplex
A libcomplex\file.txt
Updated to revision 2.

$ svn status
? lib\file.txt

My conclusion was that this can result in potential dataloss if Bob
updates and then commits, without running status. His local changes to
lib/file.txt won't make it to the repository, but the rest of his
changes will.

The solution ? svn update should say if it /unversions/ (is that a word
?) a file.

Am I too alarmist, or is that a real concern ? I understand most
command line users wouldn't have that problem, because they'll be doing
status real often, but GUI clients might not be doing that status so
often. I'm thinking of TSVN with deep tree status turned off, for
example. Part of the tree is hidden from view, so the user won't know
that his file has been unversionned.

Bye !
François

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 11 15:46:23 2004

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