I want to delete a svn branch to make sure people don't work on a archived branch by mistake (we have already merged the branch into the trunk).
However, I don't want to loose the branch's history and would ideally still want to be able to see the branch in tortoise svn's graph.
Can I have the best of both world (cleaned up branch's and history)?
If you merge a branch into trunk using "svn merge --reintegrate", you are recommended to delete the branch. If you want to do further development in that branch, you should "re-branch", effectively create a new branch with the same name, but rooted at the same revision as you merged the branch into trunk.
Find the branch folder you want to delete, right-click it, and select "Delete." Enter your commit message, and you're done.
SVN's “branch” directory runs parallel to the “trunk” directory. A SVN branch copies the trunk and allows you to make changes. When the new feature is stable, the branch is merged back.
In the repo-browser, you can look at the log for the 'branches' directory to see in which revision the branch was deleted. You can then use the revision selector in the repo browser (button in the top right, almost certainly says 'HEAD') to look at the previous revision, which will contain the branch as it was just before it was deleted.
From here, you can do what you need to do -- look at the branch in the browser, copy bits elsewhere or even check it out.
Even if you delete the branch, the history never disappears. You can probably tell TortoiseSVN's graph function to show you the repository as it existed at a particular revision in the past; this would allow you to see the old history if you really need to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With