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

tracking changes across rename

From: Peter Selinger <selinger_at_mathstat.dal.ca>
Date: 2005-09-27 06:37:23 CEST

Someone suggested I should switch from CVS to SVN, so I spent Sunday
reading the SVN book. I got very excited: the description sounded like
SVN was solving all my problems to do with renaming and copying files,
while keeping track of their common ancestry etc.

Today I experimented with SVN and I found that the features did not
work as I expected. The book says that SVN is relatively smart when
dealing with files with common ancestors, but either it is not nearly
as smart as I thought, or I am doing something terribly wrong.

Here's the concrete situation that I tested:

Create a directory project1 (revision 1)
In directory project1, create a file file1. (revision 2)
Copy directory project1 to project2 (i.e., make a branch). (revision 3)
In project 2, rename file1 as file2. (revision 4)
In project 1, make some textual change to file1. (revision 5)

Now I tried to merge the change from project1 into project2 as follows:
in an updated working copy of project2:

svn merge -r4:5 file:///tmp/svnrepos/project1

I expected that SVN would remember that file1 in project1 corresponds
to file2 in project2, and therefore would merge the change made to
file1 in revision 5 (perhaps the correction of a spelling mistake)
into file2 in project2. However, this is not what happened. Instead, I
just got the message

Skipped missing target: 'file1'

So it seems that merge behaves exactly the same as it would have,
e.g., in CVS, i.e., it simply applies a flat patch.

How can I get SVN to do "the right thing"?

Thanks, -- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 27 09:54:20 2005

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