• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 823
  • Last Modified:

Migrating Old SVN Repository Design to New SVN Repository Design

Hello Experts,

I am currently working on restructuring my SVN environment.  The new repository structure has been installed on a CentOS server with Subversion 1.7 and its structure is the following:

project
    - branches
    - tags
    - trunk
   
The old repository structure is on an AS400 using Subversion 1.4 and its structure is the following:

project
    - project folder function 1
        - branches
        - tags
        - trunk
    - project folder function 2
        - branches
        - tags
        - trunk
    - project folder function 3
        - branches
        - tags
        - trunk
       
I currently have an SVN dump file of the old repository and I would like to dump its contents into the new repository and then restructure that data to fit the new structure.  In addition to that, I need to preserve the version history of the files.  The client that I am using is TortoiseSVN.  Can anyone provide any guidance on how to get this taken care of?

Thanks in advance.
0
front71
Asked:
front71
1 Solution
 
SurranoCommented:
If my understanding is correct you are looking for the "svn move" command or its equivalent in tortoisesvn.

1. Once you've imported the dump into the new structure do a checkout to create a fresh working copy.

2. Open two Explorer windows in project\

3. In window 1, create folders "branches", "tags" and "trunk" and add them to SVN (right click / Tortoise SVN / Add)

4. In window 2, navigate to project\project folder function 1 (hereafter: pff1)

5. Using right mouse button, drag "trunk" from window 2 (project\pff1\trunk) into trunk of window 1 (project\trunk)

6. Release right mouse button and select "SVN Move and rename versioned item here"
Choose new name "pff1". Thus you'll have the pff1 trunk moved from /project/pff1/trunk to /project/trunk/pff1

7. Repeat this for all branches and tags. E.g. if you have /project/pff1/tags/v1.0 then rightdrag-drop it to /project/tags and rename it to pff1_v1.0.
Alternatively, if you want to unite same tags (branches) of different pffs then
7.1 create the common tag folder (e.g. /project/tags/v1.0) and add it to repo.
7.2 rightdrag-drop from /project/pff1/tags/v1.0 to /project/tags/v1.0 and rename to pff1
7.3 rightdrag-drop from /project/pff2/tags/v1.0 to /project/tags/v1.0 and rename to pff2 etc.

8. Commit. I recommend doing a commit after each step (whenever one of pff*/{branches,tags,trunk} directories has been moved) so that you'll have several versions and you can revert to any point if you later find that accidentally messed up one of them.

9. As a fallback (disaster recovery) plan, keep the old backup at hand.

(as a side note, we've just moved from your "new" structure to an "old" structure. whichever you prefer really depends on your blood temper but if you can't easily join the branches/tags of different subfolders then maybe the "old" structure was closer to what you really need)
0
 
front71Author Commented:
Surrano,

Thank you for your swift reply.  This was exactly what I needed.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now