Where is the 'Revert' option in Xcode 4's Source Control?

后端 未结 4 628
我寻月下人不归
我寻月下人不归 2020-12-19 04:44

I\'m using SVN in Xcode 4 as my source control; but can\'t see any option to revert to an older revision? Either a \'revert\' or an \'update to revision\' command? The \'Upd

相关标签:
4条回答
  • 2020-12-19 04:56

    Unfortunately the SCM functionality in 4.0 is fairly limited. You can commit, switch branches, branch/merge, diff previous versions, update to HEAD, but you can't revert.

    We all expect this to get better in successive updates but it does seem like a rather silly omission. The Time-Machine-like diff version picker seems the perfect place to put the UI, so I'd expect it to appear there when it's finally supported.

    0 讨论(0)
  • 2020-12-19 05:02

    You can "Discard Changes". That will revert the selected file(s).

    0 讨论(0)
  • 2020-12-19 05:10

    Just a work around: As it isn't possible to revert with Xcode - you could use any SVN tool e.g Tortoise on a Windows machine and this Tutorial.

    If you just need to compare a method or so you could also just simply compare to an older version by going to Organizer -> Respositories -> Your Project -> below in the history click the file -> View Changes. (Xcode 4)

    If you screw up your project file you could still go oldschool and copy a working revision of the file to an usb stick by using Tortoise and replacing it in your project. That's what I just did ;)

    0 讨论(0)
  • 2020-12-19 05:13

    This is kinda old question, but I manage to find a way to find and revert to old versions. As it is a Mac built in feature, not a xcode thing, it will find ALL saved versions of a specific file. But it can save you on hard times, like it saved me :~

    How to revert/recover .m file to a previous version? (autosaved blank by mistake and xcode crashed - no Source Control, no Time Machine)

    Summing up: I've opened the "file.m" I need to recover with TextEdit. Then I browse to:

    File > Revert To > Browse All Versions

    There I manage to find all versions of the file and could pick the one that I need.

    0 讨论(0)
提交回复
热议问题