Home > Development > Enterprise SCM Techniques with Xcode and Subversion

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.
    Advertisements
    Categories: Development Tags: , ,
    1. Odely
      2013/01/27 at 9:15 pm

      And what if I don’t want to pay for an IDE? there is no solution yet in XCode?

      Like

      • MickyD
        2013/01/27 at 9:34 pm

        Apple has yet to come up with an adequate solution sadly. SVN Command-line tools are free.

        Like

    2. Odely
      2013/01/27 at 9:36 pm

      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

      • MickyD
        2013/01/27 at 9:46 pm

        Yes, you are better to use manual locking via SVN command-line tools or the other SVN clients I mentioned.

        Lock the file outside of Xcode first.

        Like

        • Odely
          2013/01/27 at 10:08 pm

          Thanks I am trying Versions.app for now to see if it works. Can I cancel locking file from Xcode? so the developers wouldn’t do it “by mistake”?

          Like

        • MickyD
          2013/01/27 at 11:29 pm

          Not that I could find no sadly. Maybe try one of the chaps over at stackoverflow.com ?

          Like

    1. No trackbacks yet.

    Leave a Reply

    Please log in using one of these methods to post your comment:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: