1

I have a repository which has been expanding and expanding. Now I'm cleaning this up and want to move each project to a separate repository. My current setup:

[ProjectRepo]
- Projects
  - Software1
    - trunk (VS2010 solution inside here)
      - .sln
      - vs project #1
      - vs project #2
      - vs project #3      
    - branches
    - tags
  - Software2
    - trunk (VS2010 solution inside here)
      - .sln
      - vs project #1
      - vs project #2
      - vs project #3      
    - branches
    - tags
  - Shared
    - shared component #1 (vs project)
      - trunk
      - branches
      - tags
    - shared component #2 (vs project)
      - trunk
      - branches
      - tags

Now i want to move each project and each solution to its own repository in the trunk directory. I've been trying with svnadmin dump and svndumpfilter, but the problem is the Node-path keeps staying like the old structure. How would one get to the following structure?

[Software #1 Repo]
- trunk
- branches
- tags

[Software #2 Repo]
- trunk
- branches
- tags

[Shared Component #1 Repo]
- trunk
- branches
- tags
ferdyh
  • 1,355
  • 2
  • 11
  • 29
  • Whate are the advantages in moving the projects in different repositories? Usually to have all the code in only one repo is more convenient. – Davide Gualano May 07 '12 at 13:53
  • We have shared components among several parts of software. In my opinion its easier to bind a certain tag to a revision when in seperate repositories... Or do you have a different opinion about that? – ferdyh May 08 '12 at 05:38
  • Take a look at the svn:external property for a way to hanlde dependencies with shared components: http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html – Davide Gualano May 08 '12 at 08:24
  • We currently are using svn:externals, however isn't it easier/better when you tag to use revisions related to component instead of the overall revision number of the whole repository? – ferdyh May 08 '12 at 13:14
  • It's just a matter of habits, in my experience. Also, mantaining multiple repositories add complexity in user management (more access and passwd files to manage), in backup strategies, and make difficult to reuse a part of software1 in software2, in the case this situation will happen. – Davide Gualano May 08 '12 at 13:52
  • svn:externals are difficult to use over multiple repositories? As for user management we use VisualSVN Server with ActiveDirectory integration, so shouldn't be a problem (we're only a small company). – ferdyh May 08 '12 at 13:55
  • It is possible to use externals pointing to a different repository, but in my opinion this defeats one of the purposes and advantages of using a version control system like Subversion: having all the code in a centralized, reliable and shared location. But as I have said this is only my opinion, I hope I have given to you some points to think about while you decide the better strategy to adopt in you particular scenario :) – Davide Gualano May 08 '12 at 14:22

1 Answers1

0

If you are able to successfully filter apart the projects with svndumpfilter (I do not think this is possible if there was any 'interaction' among the projects, like copying or merging), then you can create new repositories with the old structure, and then create the new structure via svn copy and svn delete (i.e. copy Software1Repo/Projects/Software1/trunk into Software1Repo/trunk, then svn delete it, etc.).

malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87