This is a feature request for something that could have used just yesterday. Filed as rdar://13271368 and on Open Radar.
Update: I was made aware by an Apple engineer that Xcode is indeed already autosaving versions of your files as you make changes. Versions is an OS X feature. But there is no Revert menu option in Xcode to access these saves. As a workaround you can open the source file in TextEdit and do the reverting there! A hidden feature that is so well hidden, it’s even in a different app!