In the past I have really enjoyed using Trac with subversion repositories hosted on some of my own servers. The integrated ticketing and online code browsing is very conven
You should take a look at Redmine (http://www.redmine.org/). It has all of the features you mention and more. You can host it on your own vps (I do).