Enterprise SCM Techniques with Xcode and Subversion

Actually that title is a bit of an oxymoron, whilst Xcode can be used in the enterprise with SCM systems like Subversion (SVN), there are some things that Xcode refuses to do properly one of them being honouring SVN file locks.

SVN file locks allows you to mark files that should not be edited concurrently via the svn:needs-lock attribute.  Examples of files that you should really apply this to are:

  • *.XIB files
  • *.StoryBoard files

Now Xcode will see the SVN attribute and prompt you if you wish to “unlock” it.  It appears however that whatever Xcode is doing, it certainly is not informing the SVN server about SVN locks as other members in my team can perform the same action, even on Windows leading to false assumptions over file integrity.  Regardless of the OS, this passive lock breaks all user workflows if they attempt to check in the file due to a SVN error.

Solution

So what can be done about it?  We have a few options:

  1. Use SVN command-line tools in Terminal
  2. JetBrains AppCode – full alternative to Xcode (minus IB) + SVN client
  3. Zennaware Cornerstone
  4. Black Pixel Versions
    Any of the above tools fully honour SVN needs:lock for concurrent users on multiple machines and platforms.

    6 thoughts on “Enterprise SCM Techniques with Xcode and Subversion

    1. Do you mean in your post that needs-lock (even if I set with a SVN client) wouldn’t work in Xcode unless I lock the file from command tool?

      Like

    Leave a comment

    This site uses Akismet to reduce spam. Learn how your comment data is processed.