Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I see the svn branch history after I delete a branch?

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)?

like image 968
Alex KeySmith Avatar asked Nov 13 '09 12:11

Alex KeySmith


People also ask

Does svn merge delete the branch?

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.

How do I delete a branch in svn?

Find the branch folder you want to delete, right-click it, and select "Delete." Enter your commit message, and you're done.

How do svn branches work?

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.


2 Answers

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.

like image 69
Andrew Aylett Avatar answered Oct 14 '22 14:10

Andrew Aylett


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.

like image 32
Greg Hewgill Avatar answered Oct 14 '22 14:10

Greg Hewgill