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

Re: Merge of deleted file with a modified one

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-01-07 00:39:41 CET

On 1/6/06, Ryan Schmidt <subversion-2006Q1@ryandesign.com> wrote:
> On Jan 7, 2006, at 00:03, Alexey Yudichev wrote:
> [snip]
> > I discovered that if I
> > 1) create a branch from trunk via svn copy
> > 2) delete a file in branch and commit
> > 3) modify the same file in trunk and commit
> > 4) merge branch to trunk
> > I get the file deleted. Which means I lose my changes made in trunk.
> [snip]
> The file should not get deleted; rather, it should become unversioned
> in your working copy. If that's not what happens, please provide a
> transcript showing what you did.

I'm not sure that's correct. It certainly shouldn't delete it if all
you did was modify the file in your working copy, since that would be
deleting data that does not exist elsewhere and Subversion tries very
hard to never do that, but this is data that had already been
committed, which is not the same thing. No data is lost in this case,
so it's not a violation of our "don't delete unversioned data" rule.

As for the difference between "deleting a file" and "removing all the
lines in a file", they are in fact two different things from
Subversion's point of view. The first is a tree delta, which means a
change to the parent directory node in the filesystem, the second is
merely a text delta (change to the file contents). If you'd wanted to
remove all the content of the file, but not delete it, that's what you
should have done on the branch, committed an empty file, not deleted

Anyway, I'm pretty sure that deleting the file was the right thing for
merge to do in this case, as it was applying the tree delta to the
trunk. If you didn't want the file deleted, you have a chance to
revert that part of the change before committing.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jan 7 00:42:07 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.