Checkout: BrainEngine’s IDE (they had a version that lives entirely on the cloud via FLEX or Silverlight I think) and it has SVN built in!
If those guys are around they could talk about how they did it.
I don’t know if the online-version is available anymore?
Anyways,
Directly out of SFDC it wouldn’t be possible without linking the meta-data API into your org as well as a lot of other customization.