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

Viewed 7828

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

3 Answers

As explained by others, you have to find the commit ID where the branch was deleted. Once you have the commit ID, you can use:

svn log -l 10   http://svn.exemple.com/svn/myapp/branches/1.0.0@42983

To find the commit ID, you have two options:

Search the commit ID where the release was created, assuming you know the tag name and you know that tag wasn't updated later:

svn log --stop-on-copy --limit 1 -r0:HEAD   http://svn.exemple.com/svn/myapp/tags/1.0.0

Alternatively, you can search for the commit ID where that branch was deleted (a string like "D /branches/1.0.0") :

svn log --search branches/7.0.0 http://svn.exemple.com/svn/myapp/branches/  -v | grep -e 'D /branches/1.0.0'  -e '^r.*' | grep "D " -B1| head -n 20
Related