Search code examples
svntortoisesvnusabilityrevisionversion-control

Is there a good SVN tool to easily view past revisions?


Source control is great. One of the nice features is that I know that I can go back to previous revisions in case something messes up.

However, I still find myself loathe to delete a large batch of code that is no longer necessary, but that I might want to use parts of in the future. It really has no business in the current code base. However, I don't like to delete it, because I don't have an easy way to trawl through my revision history and find it. I'll often cut + paste it and put it in files with such descriptive names as "unused" and "tmp", and they'll sit there for a while.

This problem would be solved if I had a great way to browse through the repository history / search for code from the past. Is there any GUI that lets me do this, or any easy to use process I can use? Is there any way to do this with TortoiseSVN? Right now the only approach I'd know to take is to checkout different revision numbers to see if the file I want is there, and that just takes way too lang.


Solution

  • What I like to do is add a tag: say "Codebase_before_removing_such_and_such_function". Then you can go into the Repository Browser in TortoiseSVN, browser to that tag, and dig into it to find the old file. Click on that file and select "open" to just see the code in that file.

    You can also do the same by changing the Repository Browser to point to a particular revision rather than pointing to HEAD (and, again, then browsing to the particular file you want and opening it) but it's easier to tag because you can give tags meaningful names.