The Tsonny Blog

Posts with tag 'Work'

Les Houches summer school August 17, 2009

I was given the great chance to take part of one of the famous Les Houches (France) summer schools. Fantastic atmosphere, top lectures and lecturers, and great people! Let me focus here on the leisure time we had. Check out some pics below and some more on flickr and on my personal gallery (coming soon).

Les Houches hiking
Les Houches hiking
Les Houches hiking
Les Houches hiking

XCode SVN madness June 10, 2009

Apple's Xcode is a very nice source code editor, in fact, I think it's editing and navigation capabilities are better than all other tools I've seen so far.

Unfortunately, the SVN support is not so terribly good. There are some small catches you should consider. It took me days to figure them all out and you should save your time to reinvent the wheel. So there we go:

Make sure you use the latest XCode

You should at least have version 3.1.x where SVN support was improved considerably. Also notice that Apple's public XCode/SVN documentation is for an older version, but apart from the screenshots should be correct.

Move or ignore the build directory

The XCode build directory will cause a lot of headache with the built-in SVN. You should either:

  • Remove the build directory entirely if you use an external build method anyway (GNU make).
  • Change the project settings to use a build directory outside of the SVN managed working copy
  • Remove the build directory from SVN (or don't add it in the first place) and ignore it subsequently using svn propset svn:ignore build . in the folder containing the build directory.

Integration of old codes into XCode and SVN

If you have existing code that you want to manage through XCode and SVN, you will need to create an XCode project for that code first, and then select the appropriate SCM. There's a catch, though:

XCode will only manage files through SVN that are in the same folder (or subfolders) as the project's .xcodeproj file. That is problematic since usually, when you create a project, Xcode creates a directory and puts the xcodeproj file, the build directory and all other source files there. When you add existing files as references (ie. without copying them into the project folder), XCode will not manage them through SVN, even if you manually commit and checkout again.

The workaround is as follows:

  1. Manually import the existing code without any XCode-related files/folders into SVN
  2. Checkout into your working directory
  3. Create a new XCode project in the working directory
  4. Move everything within the newly created project folder into the top level of the working directory
  5. Open the project in XCode and add all existing code to it.
  6. Manually add the Xcode project file and folders to SVN (just add everything which is not in the repo yet).
  7. For other tricks on XCode and SVN, be sure to also check http://www.jms1.net/iPhone/xcode-svn.shtml