Solved

Migrating Old SVN Repository Design to New SVN Repository Design

Posted on 2014-02-06
2
706 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Prestashop 1.5 Redirect Problem 1 103
Excel file problems due to saving it back and forth in different versions 5 60
Sitefinity 8 1 68
Help with a backup script in Linux 4 75
When working in a large software development team, whether you have many developers working on the same projects, or your project is linked to other projects; it is very important that developers regularly perform "get latest" to ensure that the cha…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

8 Experts available now in Live!

Get 1:1 Help Now