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!
Since 10.7 OS X has support for Auto Save and Versions. Xcode 4 doesn’t support these tool that are invaluable to people writing much text, like developers.
It happened to me yesterday that I accidentally reverted two files that I had been working on the entire day. That kind of thing can happen if it is late and you just want to finally commit your work to the SCM, but want to revert the modifications you made for testing.
I was saved by Time Machine in this instance because it had a version from half an hour ago. Still Xcode should support Auto Save and Versions – like any other good citizen on OS X – so that I can always go back to a specific auto-save.
Even better Xcode could integrate the auto-saves with the the version comparison tool allowing editing of the current version and copy/pasting code from older versions into the current one. The use case for this is that often I find myself going back several dozens of steps with Undo, copy something from the past, Redo back into the present and then insert the code.
So in summary Xcode should:
- files should be saved frequently and automatically as I manipulate them
- allow reverting back to earlier versions of files via Versions (Time Machine-like interface via File Menu)
- allow version comparison with local history in contrast to remote history coming from SCM
Other competing development environments like AppCode have this feature already, see the attached screen shot.
Please, I love Xcode and I don’t want to switch. But you’ll get the fifth star only if you implement this. 🙂
Categories: Bug Reports