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

Re[6]: Merge of deleted file with a modified one

From: Alexey Yudichev <ayud_at_newmail.ru>
Date: 2006-01-08 14:47:48 CET

> Sure, it makes sense for your particular use case, but not for all use
> cases, that's what I'm trying to say. In order to know for sure if we
> should consider this a conflict or not Subversion really needs some
> concept of a "rename", as a distinct operation from "copy and delete".
> If something was renamed, then yes, I'm perfectly willing to
> stipulare that something should be done to ensure that changes made to
> it on the trunk persist after the merge, but Subversion doesn't do
> that right now, it copies it and deletes it, which means it's
> impossible to tell the difference between a "I deleted it because we
> don't need it anymore" and a "I renamed it".
I am sorry I still don't understand the difference. Assume a file was renamed
in the branch and modified in the trunk. During merge the old file
name will be deleted locally and scheduled for deletion in repository
(ignoring changes made in the trunk) and its copy will be added under
a new name. This copy will not contain changes made in trunk. So
again, the changes are silently lost.

>> >> Couple of our developers called this feature a show stopper for
>> >> employing subversion in our company.
>> > Out of curiosity, do you know of another system that avoids this
>> > issue? If so, what kind of behavior does it have?
>> I am curious myself how it is done in CVS. If it isn't any better I
>> would be satisfied, because this would sound like an argument :)

> CVS doesn't handle it at all, as CVS doesn't have the ability to
> rename files ;-)

Just tried the equivalent scenario with CVS (see below). CVS perfectly
recognises the situation when file was modifed in the trunk and
deleted in the branch and produces an error during merge.

C:\temp\2\prj>cvs -d/home/cvsroot co prj
cvs.EXE checkout: Updating prj
U prj/file1.txt
U prj/file2.txt

C:\temp\2\prj>cvs tag -b demo-branch
cvs.EXE tag: Tagging .
T file1.txt
T file2.txt

C:\temp\2\prj>notepad file1.txt

C:\temp\2\prj>cvs commit file1.txt
Checking in file1.txt;
/home/cvsroot/prj/file1.txt,v <-- file1.txt
new revision: 1.2; previous revision: 1.1

C:\temp\2\prj>cvs up -rdemo-branch
cvs.EXE update: Updating .
U file1.txt

C:\temp\2\prj>del file1.txt

C:\temp\2\prj>cvs rm file1.txt
cvs.EXE remove: Removing `file1.txt'
cvs.EXE remove: scheduling `file1.txt' for removal
cvs.EXE remove: use 'cvs.EXE commit' to remove this file permanently

C:\temp\2\prj>cvs commit -m"removed file1.txt in demo-branch"
cvs.EXE commit: Examining .
Removing file1.txt;
/home/cvsroot/prj/file1.txt,v <-- file1.txt
new revision: delete; previous revision:

C:\temp\2\prj>cvs up -A
cvs.EXE update: Updating .
U file1.txt

C:\temp\2\prj>cvs up -j demo-branch
cvs.EXE update: Updating .
cvs.EXE update: file file1.txt has been modified, but has been removed in revision demo-branch

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jan 8 14:49:53 2006

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.