Showing posts with label svn. Show all posts
Showing posts with label svn. Show all posts

Tuesday, January 4, 2011

How to Update CFBundleVersion Before Building Application

Used to update application version number in appDelegate.m during startup. The problem was that user has to run the application at least once to update version number in system Settings application.

Before that moment version number was either missing or wrong, depending on what the default value was. Not good.

Tuesday, July 20, 2010

The Curse of Version Control

Version control is a MUST for any developer - but that doesn't mean you have to use an external version control system. The importance is in the idea and attitude instead of using any specific tool.

Last week we got a harddisk crash, removing SVN version control and TRAC project management from service. Regardless of that - and summer vacations causing delay in repair - work must go on. Was shocked to realize how much I had started to rely and depend on SVN as part of normal development cycle. Suddenly I was on loose ground!

Version control without a version control tool requires certain kind of routines:
  • Think before you start doing anything
  • Complete your thinking before you start doing anything
  • Test your thinking before you start doing anything
  • When thinking is done, start doing - don't procastinate

This time it's all about you. It's all in the mind. It's personal.


  • Split the work into small enough parts which you can design, implement, test and release during one cycle
  • Never start anything you can't complete during same session
  • Make regular backups of your progress, even local ones
  • Document what you plan to do and how you think you did it
  • Automate anything you can
The less you have to keep in your mind, the better you can focus. The better you can focus, the faster you get results. The faster you get results, the easier it will be to fix them.

Tuesday, May 4, 2010

SVN Rollback is Backwards Merge

While debugging interesting side-effects, I decided to take a "shortcut" and rollback project sources to some earlier version. Just checking when the weird behaviour start to happen.

Found out that SVN rollback is actually a backwards merge - with the usual, expected and dreaded merge conflicts.

Successful rollback does not necessarily produce compiling code. You got to do rollback - to same version - couple times to catch all merge conflicts. Seems to depend on order of files.

Looking for SVN replacement.

Thursday, March 4, 2010

Unversioned Directory Already Exists in SVN Repository

SVN error note "Failed to add directory 'trunk/build': an unversioned directory of the same name already exists" means that your locally ignored directory has been added under version control. Maybe someone else did it, maybe you did it initially before deciding to ignore.

The fix is to remove those directories from version control. There's nothing you can do locally to fix it, you have to access the main, common, shared repository in network. Remove the directories, do refresh and updates.

Reminder how to ignore directories locally: go to folder (trunk), which contains directory (build) you want to ignore. Do command line "svn propedit svn:ignore" and make sure your list contains all the directories to be ignored.

If that command doesn't work (bash), define your editor as "export EDITOR=emacs" or whatever is your favorite editor. Control-x Control-c exits from emacs, in case you get stuck.

svn status, svn update and svn cleanup might help, too. Remember to read SVN manual BEFORE using any of those commands. You have been warned, all caused problems are own own responsibility.