You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Larry Baird <la...@gta.com> on 2015/12/16 19:16:00 UTC

Relocate not working with externals

On FreeBSD 10.2 using subversion 1.9.3 from ports, relocating a working copy
with externals does not work.  

To duplicate, create a repository containing two directories and a text file
in each directory. I created following:

    proj1
    proj1/file1.txt
    proj2
    proj2/file2.txt

Now add an external within proj1 for proj2.
    cd proj1
    svn propget svn:externals .
    ^/proj2     proj2

Commit property change to repository.

Replicate repository to a mirror repository.

Checkout proj1 from mirror

    svn co svn+ssh://mirror/svn/proj1

Relocate working group to master

    cd proj1
    svn relocate svn+ssh://master/svn/proj1

You will see error:

    svn: E155024: Invalid source URL prefix: 'svn+ssh://mirror/svn/proj1' (does not overlap target's URL 'svn+ssh://mirror/svn/proj2')

Anybody else seeing this issue?

-- 
------------------------------------------------------------------------
Larry Baird
Global Technology Associates, Inc. 1992-2012 	| http://www.gta.com
Celebrating Twenty Years of Software Innovation | Orlando, FL
Email: lab@gta.com                 		| TEL 407-380-0220

Re: Relocate not working with externals

Posted by Philip Martin <ph...@wandisco.com>.
Larry Baird <la...@gta.com> writes:

> Julian & Philip,
>> 
>> With 1.8 the relocate does not produce an error but does not relocate
>> the external either:
> Not relocating the external is a documented subverison issue.
> rarely been an issue. The externals in my world are seperate projects that
> somebody else is maintaining. I don't need to be checking them in. (-:

1.9 attempts to relocate externals from the same repository as the
relocated working copy.  I've fixed the bug with
http://svn.apache.org/r1723385

-- 
Philip Martin
WANdisco

Re: Relocate not working with externals

Posted by Larry Baird <la...@gta.com>.
Julian & Philip,

On Wed, Jan 06, 2016 at 11:27:27AM +0000, Philip Martin wrote:
> Julian Foad <ju...@apache.org> writes:
> 
> > On 16 December 2015, Larry Baird wrote:
> >> On FreeBSD 10.2 using subversion 1.9.3 from ports, relocating a working copy
> >> with externals does not work.
> >
> > Hi, Larry. Thanks for the problem report. One way you could help push
> > this issue forward is to code your test case as a Python test in
> > subversion/tests/cmdline/relocate_tests.py. There is already a test
> > called 'relocate_with_relative_externals', so maybe start by cloning
> > that test.
Do you still need a Python script for this issue, now that Philip has a
simple script to duplciate the issue?

> I can reproduce:
> 
> svnadmin create repo --compatible-version 1.8
> svnadmin create repo2 --compatible-version 1.8
> svnmucc -mm -U file://`pwd`/repo mkdir A mkdir B propset svn:externals '^/B B' A
> svnadmin dump repo | svnadmin load repo2
> svn co file://`pwd`/repo/A wc
> 
> $ svn relocate file://`pwd`/repo2/A wc
> svn: E155024: Invalid source URL prefix: 'file:///home/pm/sw/subversion/obj/repo/A' (does not overlap target's URL 'file:///home/pm/sw/subversion/obj/repo/B')
> 
> With 1.8 the relocate does not produce an error but does not relocate
> the external either:
Not relocating the external is a documented subverison issue. For me, this has
rarely been an issue. The externals in my world are seperate projects that
somebody else is maintaining. I don't need to be checking them in. (-:

> $ svn1.8 relocate file://`pwd`/repo2/A wc
> $ svn info --show-item url wc wc/B
> file:///home/pm/sw/subversion/obj/repo2/A wc
> file:///home/pm/sw/subversion/obj/repo/B wc/B
> 
> The error does not occur if the working copy root is the repository
> root:
> 
> $ svn co file://`pwd`/repo wc
> $ svn relocate file://`pwd`/repo2 wc
> $ svn info --show-item url wc wc/A wc/A/B
> file:///home/pm/sw/subversion/obj/repo2 wc
> file:///home/pm/sw/subversion/obj/repo2/A wc/A
> file:///home/pm/sw/subversion/obj/repo2/B wc/A/B

Larry

-- 
------------------------------------------------------------------------
Larry Baird
Global Technology Associates, Inc. 1992-2012 	| http://www.gta.com
Celebrating Twenty Years of Software Innovation | Orlando, FL
Email: lab@gta.com                 		| TEL 407-380-0220

Re: Relocate not working with externals

Posted by Philip Martin <ph...@wandisco.com>.
Julian Foad <ju...@apache.org> writes:

> On 16 December 2015, Larry Baird wrote:
>> On FreeBSD 10.2 using subversion 1.9.3 from ports, relocating a working copy
>> with externals does not work.
>
> Hi, Larry. Thanks for the problem report. One way you could help push
> this issue forward is to code your test case as a Python test in
> subversion/tests/cmdline/relocate_tests.py. There is already a test
> called 'relocate_with_relative_externals', so maybe start by cloning
> that test.

I can reproduce:

svnadmin create repo --compatible-version 1.8
svnadmin create repo2 --compatible-version 1.8
svnmucc -mm -U file://`pwd`/repo mkdir A mkdir B propset svn:externals '^/B B' A
svnadmin dump repo | svnadmin load repo2
svn co file://`pwd`/repo/A wc

$ svn relocate file://`pwd`/repo2/A wc
svn: E155024: Invalid source URL prefix: 'file:///home/pm/sw/subversion/obj/repo/A' (does not overlap target's URL 'file:///home/pm/sw/subversion/obj/repo/B')

With 1.8 the relocate does not produce an error but does not relocate
the external either:

$ svn1.8 relocate file://`pwd`/repo2/A wc
$ svn info --show-item url wc wc/B
file:///home/pm/sw/subversion/obj/repo2/A wc
file:///home/pm/sw/subversion/obj/repo/B wc/B

The error does not occur if the working copy root is the repository
root:

$ svn co file://`pwd`/repo wc
$ svn relocate file://`pwd`/repo2 wc
$ svn info --show-item url wc wc/A wc/A/B
file:///home/pm/sw/subversion/obj/repo2 wc
file:///home/pm/sw/subversion/obj/repo2/A wc/A
file:///home/pm/sw/subversion/obj/repo2/B wc/A/B

-- 
Philip Martin
WANdisco

Re: Relocate not working with externals

Posted by Julian Foad <ju...@apache.org>.
On 16 December 2015, Larry Baird wrote:
> On FreeBSD 10.2 using subversion 1.9.3 from ports, relocating a working copy
> with externals does not work.

Hi, Larry. Thanks for the problem report. One way you could help push
this issue forward is to code your test case as a Python test in
subversion/tests/cmdline/relocate_tests.py. There is already a test
called 'relocate_with_relative_externals', so maybe start by cloning
that test.

- Julian



> To duplicate, create a repository containing two directories and a text file
> in each directory. I created following:
>
>     proj1
>     proj1/file1.txt
>     proj2
>     proj2/file2.txt
>
> Now add an external within proj1 for proj2.
>     cd proj1
>     svn propget svn:externals .
>     ^/proj2     proj2
>
> Commit property change to repository.
>
> Replicate repository to a mirror repository.
>
> Checkout proj1 from mirror
>
>     svn co svn+ssh://mirror/svn/proj1
>
> Relocate working group to master
>
>     cd proj1
>     svn relocate svn+ssh://master/svn/proj1
>
> You will see error:
>
>     svn: E155024: Invalid source URL prefix: 'svn+ssh://mirror/svn/proj1' (does not overlap target's URL 'svn+ssh://mirror/svn/proj2')
>
> Anybody else seeing this issue?