Solved

Migrating Old SVN Repository Design to New SVN Repository Design

Posted on 2014-02-06
2
697 Views
Last Modified: 2014-02-07
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
Comment
Question by:front71
2 Comments
 
LVL 8

Accepted Solution

by:
Surrano earned 500 total points
ID: 39841237
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
 

Author Comment

by:front71
ID: 39843273
Surrano,

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INTRODUCTION Subversion is a fantastic version management and software configuration management tool for teams and individuals to manage software applications. It offers many advantages over it's CVS ancestor such as it's built-in compatibility w…
Article by: gr8gonzo
Git can be a complicated version control system for beginners, but it definitely is one of the best ones out there. Since this article assumes that you're starting at square one, it will skip over things that Git -can- do and will focus on the typic…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now