tags:

views:

162

answers:

2

I have a Subversion repository that contains the externals and some files to start creating a new site, such as a basic login setup based on libraries.

What I'm wondering is if there is a way to "copy" this repository into another that will keep the externals so I don't have to set them up again? I'm not worried about keeping the history. This would be similar to performing an export and then setting the externals, but would be a one step process. Is there a way?

+6  A: 

The commands you need are:

svnadmin dump and svnadmin load

Jonathan Parker
Would you only dump the head version, such that it would include everything as it stands at that moment?
Darryl Hein
no, make your template repository and then dump it and save the dump file. each time you create a new repo, load in the dump.
nickf
I actually just tried it with the last revision and it worked perfectly!
Darryl Hein
make sure you use --ignore-uuid for the 'svnadmin load' command! Otherwise you'll end up with multiple repositories that have the same uuid, which will get you into troubles later.
Stefan
+4  A: 

Please, make sure your new repository has a new UUID. If you just copy your repository some subversion commands will see the repository as the same.

(See svnadmin help setuuid if you need to change your uuid).

Keeping the same UUID will break some forms of caching, intra-repository merges and probably even more in future Subversion versions. (The UUID is the primary key to identify what is from a different or the same repository)

Bert Huijben