Create trunk, branch, and tag folders in subversion in an existing repository

5

I have a project that is in a repository in subversion , but NOT is inside the recommended folders: trunk, branch, and tag. As if the folder that the project is was the trunk itself. Can I create the 3 folders and put the project in the trunk folder, then create tags / branches from previous revisions without problems?

    
asked by anonymous 09.10.2014 / 20:53

2 answers

5

Yes, you can. Make a backup of your repository before this operation.

Create the trunk and branch folders, move the project from the root folder to the trunk folder using the rename operation. This will keep track of file changes.

When you need a branch, use the branch/tag operation to create it in a subfolder of the branch folder. So when you look at a file's change history in this branch, you'll also see the changes made to the branch itself (not because of the folder hierarchy but simply because you used the branch/tag operation).

I recommend using Tortoise's "explorer" or "navigator" to create the folders and rename them. It's easier and less error-prone than doing it locally and then committing.

Combine with your team so that no one has any pending commits before the operation - this also reduces the chances of facing problems.

I do not see the need for the tag folder. At least the Subversion versions I used do not have a special feature of tag ; tag and branch, at least in these versions of Subversion, are the same thing.

    
09.10.2014 / 22:03
4

You can create the 3 folders in the hand with no problems ( trunk , branch and tag ), some softwares like Tortoise have the option to create this structure.

The most important thing is that you can always go back to get something you want, one drawback is that the new folders will not have the change histories already performed, then you would have to go to the root of the project and look for its versions to find the change history. I hope I have helped.

    
09.10.2014 / 21:15