On Tuesday, February 18, 2003, at 02:54 PM, Tom Lord wrote:
>> To be more specific, I'm thinking of a situation that is
>> completely hopeless when using CVS (and many other systems).
>> Let's say that the trunk is branched for a 1.0 release.
>> After this branch, the directory structure of the trunk is
>> reorganized by renaming and/or moving files around. After
>> this stage a bug-fixed is commited to either branch, and
>> needs to be merged to the other branch. If the change only
>> affects a single file, it is quite easy to do it manually,
>> but if the change spans several files, it becomes a real pain
>> to do manually.
>> Are there any plans to add such support to Subversion?
> Yes, but not before 1.0. We track more history than we use,
> currently. Getting Merge Right is an ancient and venerable
> topic on this list
> I'm confused here because I thought svn _already_ had a more positive
> answer to that question. Is it possible that you misunderstood the
> Supposing I form a branch and, within the branch-from revision, rename
> `foo.c' to `bar.c'. In the branched-from area, `bar.c' continues to
> evolve. Is it really the case that you currently provide no automated
> mechanism to apply the `bar.c' changes to my `foo.c'? Or for that
> matter to merge the renames from branched-from to branched-to?
My understanding is that Karl is right. At the moment, renames are
copy+delete. For that copy there is no difference between a copy, a
rename, and a branch. Making renames into an atomic operation is Issue
#898. When you try to merge into the moved item, it has moved and
there is no way to follow the copy to find it. (what happens if there
is more than one copy?) An example of this is below.
This is also tangentially related to Issue #1141 that I filed recently.
That issue is about the lack of conflicts when something has been
deleted and you try and merge into it.
% svn --version
svn, version 0.17.1 (dev build)
compiled Feb 17 2003, 13:50:51
% mkdir demo
% cd demo
% svnadmin create repos
% svn co file://`pwd`/repos wc1
Checked out revision 0.
% cd wc1
% svn mkdir trunk
% svn mkdir branches
% cd trunk
% cat > file
This is a file
% svn add file
% cd ../..
% svn commit wc1 -m "add dir structure and a file in trunk"
Transmitting file data .
Committed revision 1.
% svn cp file://`pwd`/repos/trunk file://`pwd`/repos/branches/bA -m
"make a branch"
Committed revision 2.
% svn up wc1
Updated to revision 2.
% cd wc1/trunk
% svn mv file movedFile
% svn commit -m "move file"
Committed revision 3.
% cd ../branches/bA
% cat >> file
Add a line
% svn commit -m "edit the branch"
Transmitting file data .
Committed revision 4.
% cd ../../..
% svn merge -r3:4 file://`pwd`/repos/branches/b1 wc1/trunk
svn: Filesystem has no item
svn: file not found: transaction `6', path `/branches/b1'
Dr William Uther National ICT Australia
Phone: +61 2 9385 6926 School of Computer Science and
Email: email@example.com University of New South Wales
Jabber: firstname.lastname@example.org Sydney, Australia
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Tue Feb 18 06:30:53 2003