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

svn merge on branches containing moved files/directories

From: Volker Hejny <V.Hejny_at_fz-juelich.de>
Date: 2005-03-15 11:49:56 CET

Dear all,

I'm currently facing a problem, which - after reading all documentation -
I was sure subversion can handle.

Summary: A branch was created to do a major redesign of the directory
structure. Normal maintanance was done on trunk in parallel. When trying
to merge the branch back into trunk, all changes on files which had been
moved in the branch were lost. The same happens to files, which were
added to trunk in directories which are renamed in the branch. I'm using
subversion 1.1.3, the original problem occurs using the svn+ssh protocoll,
but the basic example below I did with a local repository.

The example:

- I created a local subversion repository file:///repo and import as
  trunk the following files:
- I created a branch using
  svn copy file:///repo/trunk file:///repo/branches/branch1
      -m 'creating branch1'

  This created revision 3
- I checked out branch1 and did the following changes:
  svn move dir1 dir2
  svn commit
  This created revision 4
- I checked out trunk and did the changes:
  editing dir1/file1
  touch dir1/file3
  svn add dir1/file3
  svn commit
  This created revision 5
- Now I tried to merge branch1 to trunk:
  cd trunk
  svn update (well, to be sure)
  svn merge -r 3:HEAD file:///repo/branches/branch1
  A dir2
  A dir2/file1
  A dir2/file2
  D dir1/file1
  D dir1/file2
  D dir1/file3
  D dir1
  Result: dir1 is empty (file3 removed) and dir2/file1 does not
          contain the changes from dir1/file1 in trunk (revision 5)
What I expected was to get a conflict for file3 (new file in directory
which is to be deleted) and a proper handling of changes in file1.

Originally I switched from cvs just because of subversion's ability to
version directories and to allow renames. Well, hopefully I'm doing
something wrong in the example above ...

Best regards,

Dr. Volker Hejny                Tel: 02461/616853                      ** 
Institut f. Kernphysik          Fax: 02461/613930                     **
---------------------------------------------------------------- **  ** ---  
Forschungszentrum Juelich GmbH, D-52425 Juelich                    **
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 15 11:54:36 2005

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.