You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Giulio Troccoli <Gi...@uk.linedata.com> on 2007/03/21 09:42:14 UTC

Moving repository

Hello everybody,

I have read through the svn book and do some tests too, and to my knowledge there is no solution to my problem, but maybe I'm wrong and someone in the list knows how to do it.

For historical reasons we have a single repository for many products we develop. These products are totally independent so it's not a big deal to have them in the same repository or not. However, we would like to move some products to their own repositories for a more logical and "clean" layout.

I know how to do this, using svnadmin dump, svndumpfilter and svnadmin load, keeping the revisions numbers. I have tested this procedure and it works fine. My problem, however, is how to minimise the impact of this on the developers.

Ideally, the developers, after the migration to the new repository have been completed, should need only to do something like svn switch <NEW URL>, but it doesn't work, not even with the --relocate switch.

The problem could be because I want to relocate a WC of http://<host>/<old rep>/<product> to http://<host>/<new rep>. If I try it I have the error

svn: Relocate can only change the repository part of an URL

which, I think, means that I could only change it to something like http://<host>/<new-rep>/<product>

If I don't use the --relocate switch, then I have the error

svn: 'http://<host>/<new rep>'
is not the same repository as
'http://<host>/<old rep>'

which makes sense.

To be even clearer, the layout we have at the moment is something like this:

<host>
   |___ <old rep>
            |_______ <product 1>
                          |________ <dir 1>
                          |________ <dir 2>
                          |________ <dir 3>
            |_______ <product 2>
                          |________ <dir A>
                          |________ <dir B>
                          |________ <dir C>
            |_______ <product 3>
            |_______ <product 4>

And we would like to change it to something like

<host>
  |___ <new rep 1>
            |________ <dir 1>
            |________ <dir 2>
            |________ <dir 3>
  |___ <new rep 2>
            |________ <dir A>
            |________ <dir B>
            |________ <dir C>
  |___ <new rep 3>
  |___ <new rep 4>

The only solution I could think of is for developers to delete their old WCs and check out new ones. But this means that if they are not careful they could loose their changes, that's why a solution using svn to "relocate" the WCs would be more desirable.

Any thoughts? Oh, and by the way, we are using Subversion 1.3.0

Thanks
Giulio

-------------------
Giulio Troccoli
Technical Consultant
 
T +44 (0)20 7360 1914   F +44 (0)20 7360 1974
E giulio.troccoli@uk.linedata.com   W www.linedata.com
MSN Messenger giulio@troccoli.it
 
 
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851     VAT Reg No 778499447

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Moving repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 21, 2007, at 05:25, Ashutosh Mohanty wrote:

>> For historical reasons we have a single repository for many  
>> products we
>> develop. These products are totally independent so it's not a big  
>> deal to
>> have them in the same repository or not. However, we would like to  
>> move some
>> products to their own repositories for a more logical and "clean"  
>> layout.
>>
>> I know how to do this, using svnadmin dump, svndumpfilter and  
>> svnadmin load,
>> keeping the revisions numbers. I have tested this procedure and it  
>> works
>> fine. My problem, however, is how to minimise the impact of this  
>> on the
>> developers.
>>
>> Ideally, the developers, after the migration to the new repository  
>> have been
>> completed, should need only to do something like svn switch <NEW  
>> URL>, but
>> it doesn't work, not even with the --relocate switch.
>>
>> The problem could be because I want to relocate a WC of http:// 
>> <host>/<old
>> rep>/<product> to http://<host>/<new rep>. If I try it I have the  
>> error
>>
>> svn: Relocate can only change the repository part of an URL
>>
>> which, I think, means that I could only change it to something like
>> http://<host>/<new-rep>/<product>
>>
>> If I don't use the --relocate switch, then I have the error
>>
>> svn: 'http://<host>/<new rep>'
>> is not the same repository as
>> 'http://<host>/<old rep>'
>>
>> which makes sense.

[snip]

>> The only solution I could think of is for developers to delete  
>> their old WCs
>> and check out new ones. But this means that if they are not  
>> careful they
>> could loose their changes, that's why a solution using svn to  
>> "relocate" the
>> WCs would be more desirable.
>
> You are right, you already tried all sort of things, "svn swich"  
> command
> sounds okay to me," --relocate" is only for URL rewriting, anyway,  
> just try
> to switch from sub-directory itself; as per your layout--

[snip]

> go to <host> /<old rep> /<product1> /<dir 1>  and switch to the same
> sub-directory point in new repository, I guess it may works for you!!

Sorry, Giulio, there is no way to do what you want. "svn switch" is  
for switching within a repository, for example to switch a trunk  
working copy to a branch. "svn switch --relocate" is for when you  
have moved a repository to a new location on the server, or to a  
different hostname, or to a different repository access protocol.  
Neither of these apply in your situation. In your situation, you have  
actually changed the repository. You have dumped part of it and  
loaded it into a new repository which has different revisions than  
the original repository (revision 1 of the new repository is probably  
not the same as revision 1 of the old repository, etc.), maybe has a  
different layout than the old repository, has a different UUID than  
the old repository, etc. You must throw away the old working copies  
and check out new ones. There is no other way.


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving repository

Posted by Ashutosh Mohanty <as...@syncad.com>.
Hi,



You are right, you already tried all sort of things, "svn swich" command
sounds okay to me," --relocate" is only for URL rewriting, anyway, just try
to switch from sub-directory itself; as per your layout--



 <host>
   |___ <old rep>
            |_______ <product 1>
                          |________ <dir 1>
                          |________ <dir 2>
                          |________ <dir 3>
            |_______ <product 2>
                          |________ <dir A>
                          |________ <dir B>
                          |________ <dir C>
            |_______ <product 3>
            |_______ <product 4>

>>>>>>>>>>>>New one
<host>
  |___ <new rep 1>
            |________ <dir 1>
            |________ <dir 2>
            |________ <dir 3>
  |___ <new rep 2>
            |________ <dir A>
            |________ <dir B>
            |________ <dir C>
  |___ <new rep 3>
  |___ <new rep 4>



go to <host> /<old rep> /<product1> /<dir 1>  and switch to the same
sub-directory point in new repository, I guess it may works for you!!



Regards,

Ashutosh



----- Original Message ----- 
From: "Giulio Troccoli" <Gi...@uk.linedata.com>
To: <us...@subversion.tigris.org>
Sent: Wednesday, March 21, 2007 3:12 PM
Subject: Moving repository


Hello everybody,

I have read through the svn book and do some tests too, and to my knowledge
there is no solution to my problem, but maybe I'm wrong and someone in the
list knows how to do it.

For historical reasons we have a single repository for many products we
develop. These products are totally independent so it's not a big deal to
have them in the same repository or not. However, we would like to move some
products to their own repositories for a more logical and "clean" layout.

I know how to do this, using svnadmin dump, svndumpfilter and svnadmin load,
keeping the revisions numbers. I have tested this procedure and it works
fine. My problem, however, is how to minimise the impact of this on the
developers.

Ideally, the developers, after the migration to the new repository have been
completed, should need only to do something like svn switch <NEW URL>, but
it doesn't work, not even with the --relocate switch.

The problem could be because I want to relocate a WC of http://<host>/<old
rep>/<product> to http://<host>/<new rep>. If I try it I have the error

svn: Relocate can only change the repository part of an URL

which, I think, means that I could only change it to something like
http://<host>/<new-rep>/<product>

If I don't use the --relocate switch, then I have the error

svn: 'http://<host>/<new rep>'
is not the same repository as
'http://<host>/<old rep>'

which makes sense.

To be even clearer, the layout we have at the moment is something like this:

<host>
   |___ <old rep>
            |_______ <product 1>
                          |________ <dir 1>
                          |________ <dir 2>
                          |________ <dir 3>
            |_______ <product 2>
                          |________ <dir A>
                          |________ <dir B>
                          |________ <dir C>
            |_______ <product 3>
            |_______ <product 4>

And we would like to change it to something like

<host>
  |___ <new rep 1>
            |________ <dir 1>
            |________ <dir 2>
            |________ <dir 3>
  |___ <new rep 2>
            |________ <dir A>
            |________ <dir B>
            |________ <dir C>
  |___ <new rep 3>
  |___ <new rep 4>

The only solution I could think of is for developers to delete their old WCs
and check out new ones. But this means that if they are not careful they
could loose their changes, that's why a solution using svn to "relocate" the
WCs would be more desirable.

Any thoughts? Oh, and by the way, we are using Subversion 1.3.0

Thanks
Giulio

-------------------
Giulio Troccoli
Technical Consultant

T +44 (0)20 7360 1914   F +44 (0)20 7360 1974
E giulio.troccoli@uk.linedata.com   W www.linedata.com
MSN Messenger giulio@troccoli.it


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851     VAT Reg No 778499447

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org