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

Asked

Viewed 3,408 times

5

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

  • 1

    You can create the 3 folders without problems, you will always be able to go back to fetch something you want, the point is that the new folder will not have the history of changes already made, then you would have to go to the root of the project and fetch its versions to fetch a previous Vision.

2 answers

5


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

Create the folders trunk and branch, move the project from the root folder to the folder trunk using the operation rename. This way you will keep file change history.

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

I recommend using Tortoise’s "explorer" or "Navigator" to create folders and do Rename. It’s easier and less subject to errors than doing it locally and then commiting.

Combine with your team so that no one has any pending commit before the operation - this also decreases the chances of facing issues.

I see no need for the briefcase tag. At least the versions of Subversion I used have no special tag; tag and branch, at least in these versions of Subversion, are the same thing.

  • Very good had not thought of the operation rename can be very helpful, but you can only do so if you have a single folder at the root of the versioning.

  • @Diegosantos The operation rename works both in folder and in files, so that you can select everything that is at the root (except the folder trunk that you just created, of course) and perform the operation rename in order to move everything at once to the trunk folder.

4

You can create the 3 folders in hand smoothly(trunk, branch and tag), some software like Tortoise has the option to create this structure.

The important thing is that you can always go back to get something you want, an obstacle is that the new folders will not have the history of changes already made, then you would have to go to the root of the project and search for its versions to find the history of changes. I hope I helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.