tags:

views:

180

answers:

1

So here's an example of what I currently have

RepoA
- trunk
-- directory_a
-- directory_b
-- directory_c

I need to get directory_b out of the RepoA and into its own repository (RepoB).

RepoA
- trunk
-- directory_a
-- directory_c

RepoB
- trunk
-- directory_b

Is the best way to do this by cloning the master RepoA SVN directory to RepoB, then removing directory_b from RepoA and removing directories directory_a and directory_c from RepoB?

Or is there some other, more elegant, way to extract directory_b from RepoA and get it into its own repository?

+1  A: 

If you want to keep the history of directory_b in the new repository, then you might do this:

  • dump the existing repository
  • filter the dump using svndumpfilter, so that it only contains directory_b
  • load the dump into the new repository
  • in the first repository, delete directory_b

If you do not need the history in the new repository, then you might export directory_b from the existing repository and import the resulting folder into the new repository.

When you say "cloning", did you mean copying the repository? I would not recommend copying repositories, because otherwise (AFAIK) you will have two repositories with the same ID (which is probably not what you want).

M4N