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

Re: A merge question

From: William Uther <willu_at_cse.unsw.edu.au>
Date: 2003-02-18 06:30:11 CET

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
> question?
>
> 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.

Be well,

Will :-}

% 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
A trunk
% svn mkdir branches
A branches
% cd trunk
% cat > file
This is a file
% svn add file
A file
% cd ../..
% svn commit wc1 -m "add dir structure and a file in trunk"
Adding wc1/branches
Adding wc1/trunk
Adding wc1/trunk/file
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
A wc1/branches/bA
A wc1/branches/bA/file
Updated to revision 2.
% cd wc1/trunk
% svn mv file movedFile
A movedFile
D file
% svn commit -m "move file"
Deleting trunk/file
Adding trunk/movedFile

Committed revision 3.
% cd ../branches/bA
% cat >> file
Add a line
% svn commit -m "edit the branch"
Sending bA/file
Transmitting file data .
Committed revision 4.
% cd ../../..
% svn merge -r3:4 file://`pwd`/repos/branches/b1 wc1/trunk
subversion/libsvn_fs/tree.c:180: (apr_err=160013)
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 
Engineering
Email: willu@cse.unsw.edu.au             University of New South Wales
Jabber: willu@jabber.cse.unsw.edu.au          Sydney, Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 18 06:30:53 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.