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

Re: svn merge bug

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-06-09 23:18:00 CEST

On Jun 7, 2007, at 13:03, Christopher Read wrote:

> We stumbled across an interesting merge bug that appears to be a new
> feature of version 1.4. To replicate, do the following:
>
>> cd /tmp
>> svnadmin create reposA
>> svnadmin create reposB
>> mkdir work
>> cd work/
>> svn co file:///tmp/reposA
>> cd ..
>> svn co file:///tmp/reposB
>> cd reposA/
>> mkdir trunk
>> svn add trunk
>> svn commit
>> cd ../reposB/
>> mkdir trunk
>> svn add trunk/
>> svn commit
>> cd ../reposA/trunk
>> touch existing.txt
>> svn add existing.txt
>> svn commit
>> cd ../../reposB/trunk/
>> svn merge -r 1:HEAD file:///tmp/reposA/trunk .
>
> At this stage, if you're using version 1.3.2 (or doing --dry-run with
> 1.4.3), it looks good. However, with version 1.4.3 we get:
>
> svn: Copyfrom-url 'file:///tmp/reposA/trunk/existing.txt' has
> different
> repository root than 'file:///tmp/reposB'
>
> To work around the 1.4 problem, we have to do:
>
>> touch existing.txt
>> svn add existing.txt
>> svn merge -r 1:HEAD file:///tmp/reposA/trunk .
> A existing.txt
>
> Which kinda works, but is not very elegant.
>
> We've done some digging around the code, and have noticed that
> svn_wc_add_repos_file was re-written between 1.3 and 1.4, so we
> suspect
> the problem is in there somewhere...

The bug was that it was possible to merge across repositories before.
This was fixed in 1.4 by making it impossible to merge across
repositories.

Sounds like the workaround you've found is a bug, which should be
fixed in Subversion so that what you tried to do no longer works.

If you want to be able to merge, everything must be in one
repository, as the error message (approximately) says.

In February 2005, Ben Collins-Sussman wrote:

http://svn.haxx.se/users/archive-2005-02/0369.shtml

>> Is there any way to merge across repositories?
>
> Nope.

In September 2005, Joshua Varner wrote:

http://svn.haxx.se/users/archive-2005-09/1383.shtml

> Merging wasn't intended to work across repositories, it just
> currently does, so this behavior may or may not continue to be
> supported

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jun 9 23:18:53 2007

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.