Why re-invent the wheel?
It's not exactly the most readable thing when you actually want to see everything that's been changed for one. It doesn't know anything about the SVN revision numbers for another.
As for which branches a commit belongs to, the solution is git branch --contains. This will list all the branches that contain a commit right now
. There is no way to reliably determine which branch originally contained a commit. (Or at least, I don't think there is.) Especially since feature branches can disappear after they've been merged into master. There's even no guarantee that the master repository ever had the original branch a commit was made to.
Mostly, though, the main "problem" is that it's been a few years since I've done any web programming. I'm going to have to relearn some stuff to redo this. The current backed runs svn log every five minute and dumps any new changes into a SQL database that the web interface pulls from. With git, it would probably be better to use git log and other command-line facilities to retrieve this information on demand than try to store it in a separate database.