Vaibhav Bajpai
Vaibhav Bajpai

Reputation: 16774

How to export a svn project into another svn repository?

I have a readonly access to a SVN project. I checked out the project, and now I want to work on local copy (and want to version it along the way, but I cannot in the same SVN because I do not have access, instead I would have just created a branch) So, I create a new SVN repository, and now I want to import the checked out directory into the new SVN trunk.

The problem is every directory (and subdirectory so-forth) in my checked-out folder already has a hidden .svn folder (from the previous repo). When I try to import into the new repo, it complains that it is already sub-versioned!

If I remove .svn from each folder (and nested folders within) that would solve my problem, there has to be better way?

Upvotes: 4

Views: 4382

Answers (3)

jmanning2k
jmanning2k

Reputation: 9478

Sounds like a "Vendor Branch".

Try svn copy directly from the "foreign" repository into your repo (or wc).

Or, use the svn_load_dirs.pl script bundled with subversion that will import and tag the vendor branch appropriately.

Using the vendor branch strategy will not help you much now, but will be useful later when you want to update to a newer version of the project you are trying to import.

Upvotes: 0

jv42
jv42

Reputation: 8583

You're looking for "svn export", which serves this purpose (removing all .svn directories).

Upvotes: 0

Pekka
Pekka

Reputation: 449485

Don't check it out, but export it. Exporting will produce a clean directory tree.

svn export <path>

you can export from a remote repo, or a local working copy.

Upvotes: 3

Related Questions