On Sun, Oct 18, 2009 at 04:15:27PM -0700, Jacob Weber wrote:
> Say I have a branch with a folder "a", and I add a file inside it. At
> the same time, on the trunk someone deletes "a". If I merge the trunk
> into my branch, shouldn't this show up as a tree conflict? Currently
> it just shows up as an incoming deletion of "a". This is using SVN
> 1.6.5 client and server. Here's an example:
>
> # create trunk
> svn mkdir -m '' svn://localhost/repos/temp
> svn mkdir -m '' svn://localhost/repos/temp/a
>
> # create branch
> svn cp -m '' svn://localhost/repos/temp svn://localhost/repos/temp2
>
> # remove dir on trunk
> svn rm -m '' svn://localhost/repos/temp/a
>
> # add something inside dir on branch
> svn mkdir -m '' svn://localhost/repos/temp2/a/b
>
> # merge trunk into branch
> svn co svn://localhost/repos/temp2
> cd temp2
> svn merge svn://localhost/repos/temp
> --- Merging r10566 through r10568 into '.':
> D a
This is a known case we don't support yet.
The problem is that we need to find out whether anything has changed
in temp2/a since the branch was created (i.e answer the question "does
temp2/a have modifications local to this branch?"). But our diffing code
currently does not properly support diffing working copies against
arbitrary trees at arbitrary revisions in the repository, because this
use case was simply not considered when that code was written.
So we cannot detect this tree conflict right now.
The alternative of flagging a tree conflict on *any* incoming directory
deletion would obviously not have been very popular...
Note that this works during updates, where modifications are trivial to
detect since they are always relative to the BASE revision of the working
copy. But it does not work during merge.
There is slow, ongoing work to fix the underlying problem, but it will
still take time, and it's not trivial. It involves rewriting more than
just the diff subsystem. The "editor interface" needs to be tweaked,
which is one of the core concepts of Subversion, see
http://www.red-bean.com/kfogel/beautiful-code/bc-chapter-02.html
Changing this API means changing many components of svn.
For more information on the new editor interface see
http://svn.collab.net/repos/svn/trunk/notes/editor-v2.txt and
http://svn.collab.net/repos/svn/trunk/subversion/include/svn_editor.h
Once this new interface is being used (it's not being used yet),
we can correctly flag a tree conflict for incoming directory deletions.
Stefan
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408887
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-19 11:26:37 CEST