You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Faheem Mitha <fa...@email.unc.edu> on 2003/04/25 05:19:06 UTC

copying projects across repositories

Dear People,

Another dimwitted beginner question...

I created two repositories, located at /home/faheem/svn and
/home/faheem/svntmp.

I intend the former to serve as my repository proper, and the latter
as a staging area/experimental sandbox.

I created a project called thesis in /home/faheem/svntmp. The files
are all contained in thesis/trunk.

I thought that I would be able to copy this project from the svntmp to
the svn repository by doing

faheem ~/co/thesis/trunk>svn copy file:///home/faheem/svntmp/thesis 
                                  file:///home/faheem/svn/thesis
svn: Couldn't find a repository.
svn: Unable to open an ra_local session to URL
svn: svn_ra_local__split_URL: Unable to find valid repository
   (file:///home/faheem) 

However, the command appears to think the repository is located at
home/faheem. Note at the time of the command there did not exist any
directory called thesis in svn.

I then created the directory thesis in svn with

faheem ~/co/thesis/trunk>svn mkdir file:///home/faheem/svn/thesis/

I then tried 

faheem ~/co/thesis/trunk>svn copy file:///home/faheem/svntmp/thesis/trunk 
                                  file:///home/faheem/svn/thesis/trunk

but got a similar error message.

I'm not completely clear why this command does not work. The
Subversion Book does not prescribe the exact rules that govern this
command, but all the examples given for copying between repositories
are for creating branches and tags within one repository.

I'd like to know why the above operation does not work, and if there
is a correct method of doing it.

I realise I can simply check out the files from svntmp and check them
back in to svn, and this is what I will probably do if all else
fails. But it would be nice to have a more direct method.

                                                Faheem.


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

Re: copying projects across repositories

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 25 Apr 2003, Michael Wood wrote:

> Since nobody else has asked... why do you need to store them in two
> separate repositories in the first place?
>
> Why not have http://svn.example.com/svn/thesis/ as your repository and
> then have sandbox/ and stable/ or whatever directories within that
> single repository.  Then you can copy/merge etc. from one to the other.

Well, as a complete beginner, the possibility that I might completely
trash the main repository (which I am already using to store data) by
experimenting, seemed at least possible. Therefore I thought it safer to
use a completely seperate repository for experimentation.

As I get more confident, I expect I will do this less.

                                                   Faheem.



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

Re: copying projects across repositories

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Fri, Apr 25, 2003 at 03:34:05PM -0400, Garrett Rooney wrote:
> Faheem Mitha wrote:
> 
> >On 25 Apr 2003, Ben Collins-Sussman wrote:
> >
> > 
> >
> >>Faheem Mitha <fa...@email.unc.edu> writes:
> >>
> >>   
> >>
> >>>I'm not completely clear why this command does not work. The
> >>>Subversion Book does not prescribe the exact rules that govern this
> >>>command, but all the examples given for copying between repositories
> >>>are for creating branches and tags within one repository.
> >>>     
> >>>
> >>Yes, indeed, for subversion 1.0, copies can only be made within a
> >>single repository.  There is no cross-repository branching or merging.
> >>
> >>I think the book probably needs to make this point clear.  I'll add it
> >>to my to-do list.
> >>   
> >>
> >
> >What would you recommend for transferring branches/projects across
> >repositories?
> > 
> >
> 
> well first, you add support for copying between repositories to 
> subversion...
> 
> seriously, there is no easy way to do that.  you can approximate it by 
> dumping part of one repository and importing it into the other, but it's 
> a bad approximation of what you're really trying to do.  the final 
> solution to what you're asking is way in the post-1.0 category.

Since nobody else has asked... why do you need to store them in two
separate repositories in the first place?

Why not have http://svn.example.com/svn/thesis/ as your repository and
then have sandbox/ and stable/ or whatever directories within that
single repository.  Then you can copy/merge etc. from one to the other.

-- 
Michael Wood <mw...@its.uct.ac.za>

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

Re: copying projects across repositories

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Friday, April 25, 2003, at 05:14 PM, Faheem Mitha wrote:

> I was not aware of the existence of svndumpfiler. I had not come 
> across it
> when browsing the Subversion Book. Hmm, it doesn't seem to be 
> mentioned in
> the section "Migrating a Respository".

svndumpfilter is rather new, so it hasn't been documented in the book 
yet.

-garrett


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

Re: copying projects across repositories

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 25 Apr 2003, Garrett Rooney wrote:

> that will get the contents from one repository to another, but it won't
> preserve the history.  doing an svnadmin dump, filtering out the parts
> you don't want with svndumpfilter,  and a svnadmin load would preserve
> your history, which is generally what people want when moving stuff from
> one repository to another.

Fortunately, in this case I have no history worth mentioning, so it is not
an issue. Also, I'll wait to try fancy stuff like the above when I have
more experience with subversion.

I was not aware of the existence of svndumpfiler. I had not come across it
when browsing the Subversion Book. Hmm, it doesn't seem to be mentioned in
the section "Migrating a Respository".

Thanks.

                                                    Faheem.


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

Re: copying projects across repositories

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Faheem Mitha wrote:

>Sorry, I'm a cretin. Of course, this is just what
>
>svn export
>
>does. So I could do a
>
>svn checkout ... from /home/faheem/svn
>
>followed by a
>
>svn export... from /home/faheem/svntmp
>
>and then do a
>
>svn import... (or svn add) into /home/faheem/svn.
>  
>

that will get the contents from one repository to another, but it won't 
preserve the history.  doing an svnadmin dump, filtering out the parts 
you don't want with svndumpfilter,  and a svnadmin load would preserve 
your history, which is generally what people want when moving stuff from 
one repository to another.

-garrett


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

Re: copying projects across repositories

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 25 Apr 2003, Faheem Mitha wrote:

>
>
> On Fri, 25 Apr 2003, Garrett Rooney wrote:
>
> > well first, you add support for copying between repositories to
> > subversion...
> >
> > seriously, there is no easy way to do that.  you can approximate it by
> > dumping part of one repository and importing it into the other, but it's
> > a bad approximation of what you're really trying to do.  the final
> > solution to what you're asking is way in the post-1.0 category.
>
> Ok. So is there a way to just dump files from part of a respository
> (without the accompanying metadata included in .svn)? I don't think
> svnadmin dump does this exactly, since it would carry the metainformation
> along with it, which would presumably confuse the importing repository.

Sorry, I'm a cretin. Of course, this is just what

svn export

does. So I could do a

svn checkout ... from /home/faheem/svn

followed by a

svn export... from /home/faheem/svntmp

and then do a

svn import... (or svn add) into /home/faheem/svn.

                                                     Faheem.



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

Re: copying projects across repositories

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 25 Apr 2003, Garrett Rooney wrote:

> well first, you add support for copying between repositories to
> subversion...
>
> seriously, there is no easy way to do that.  you can approximate it by
> dumping part of one repository and importing it into the other, but it's
> a bad approximation of what you're really trying to do.  the final
> solution to what you're asking is way in the post-1.0 category.

Ok. So is there a way to just dump files from part of a respository
(without the accompanying metadata included in .svn)? I don't think
svnadmin dump does this exactly, since it would carry the metainformation
along with it, which would presumably confuse the importing repository.

                                               Faheem.


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

Re: copying projects across repositories

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Faheem Mitha wrote:

>On 25 Apr 2003, Ben Collins-Sussman wrote:
>
>  
>
>>Faheem Mitha <fa...@email.unc.edu> writes:
>>
>>    
>>
>>>I'm not completely clear why this command does not work. The
>>>Subversion Book does not prescribe the exact rules that govern this
>>>command, but all the examples given for copying between repositories
>>>are for creating branches and tags within one repository.
>>>      
>>>
>>Yes, indeed, for subversion 1.0, copies can only be made within a
>>single repository.  There is no cross-repository branching or merging.
>>
>>I think the book probably needs to make this point clear.  I'll add it
>>to my to-do list.
>>    
>>
>
>What would you recommend for transferring branches/projects across
>repositories?
>  
>

well first, you add support for copying between repositories to 
subversion...

seriously, there is no easy way to do that.  you can approximate it by 
dumping part of one repository and importing it into the other, but it's 
a bad approximation of what you're really trying to do.  the final 
solution to what you're asking is way in the post-1.0 category.

-garrett


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

Re: copying projects across repositories

Posted by Faheem Mitha <fa...@email.unc.edu>.

On 25 Apr 2003, Ben Collins-Sussman wrote:

> Faheem Mitha <fa...@email.unc.edu> writes:
>
> > I'm not completely clear why this command does not work. The
> > Subversion Book does not prescribe the exact rules that govern this
> > command, but all the examples given for copying between repositories
> > are for creating branches and tags within one repository.
>
> Yes, indeed, for subversion 1.0, copies can only be made within a
> single repository.  There is no cross-repository branching or merging.
>
> I think the book probably needs to make this point clear.  I'll add it
> to my to-do list.

What would you recommend for transferring branches/projects across
repositories?

I tried checking out the (empty) thesis project from /home/faheem/svn, and
then did a svn copy from the thesis files in /home/faheem/svntmp/thesis.
Subversion got unhappy and said

svn: Trying to use an unsupported feature
svn: Source URL is from foreign repository.

though it still did a checkout from svntmp.

Is there any way currently of doing this? I can just import the raw files
into svn, but then I would lose the history from the original repository
(svntmp).

                                               Faheem.


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

Re: copying projects across repositories

Posted by Ben Collins-Sussman <su...@collab.net>.
Faheem Mitha <fa...@email.unc.edu> writes:

> I'm not completely clear why this command does not work. The
> Subversion Book does not prescribe the exact rules that govern this
> command, but all the examples given for copying between repositories
> are for creating branches and tags within one repository.

Yes, indeed, for subversion 1.0, copies can only be made within a
single repository.  There is no cross-repository branching or merging.

I think the book probably needs to make this point clear.  I'll add it
to my to-do list.

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