As a software developer I work with SVN (our source control system) pretty extensively on a day-to-day basis. Having worked with several other systems in the past I must admit it is an excellent source/version control system, very easy to use for simple routine operations, but the one which has tons of small very useful (sometimes just amazingly useful) extensions. However it’s not without it’s own glitches.

In particular I’m talking about a “dead end” situation when there is a checkin/checkout conflict. These are details of it:

  • There is a working folder locally on my machine with numerous sub-folders and files in it, all of them are under Subversion control.
  • Apparently there are new files in SVN repository within this folder, added by other developers. These files are not yet in my working folder, but for whatever reason SVN thinks that they are.
  • When I do SVN Update in Tortoise SVN, nothing gets added into my working folder, because files are already marked as local in system SVN files.
  • If I do SVN Clean-up, it finishes successfully, but doesn’t resolve the issue.
  • If I manually place these new files into my working folder and do SVN Commit, it fails to do because files are already in SVN repository.

Okay, where to from here? I cannot checkout and I cannot commit, clean-up doesn’t work. This situation happens to me every now and then. Every time it is a painful effort to get it resolved. On-line search doesn’t help much. Finally yesterday I came up with a reasonably easy approach – Windows Explorer came to the rescue. Just make sure first that all changed items (if you have any) in your working folder are committed to SVN.

First I thought about creating a batch script to delete all system “.svn” folders within my working folder, but realised that I may lose this script in some time. Apparently an easier way is to open a Windows Explorer, navigate to your working folder and do search for “.svn”. 

Now the only thing you need to do is to select all items and delete them. All of a sudden your working folder gets out of SVN control. Then in Windows Explorer navigate to your folder, right click with your mouse and do SVN Checkout – this will ensure that it gets back under SVN control with all missing files in place and order restored.

You may also like

Unique Arrays in PHP

I was recently working on a PHP application for a Client where I was faced with a Multi-Dimensional Array filled with duplicate entries and a lot of unusable data. What I needed was to extract all the unique elements of the Array so I had some clean data to work with. 

Keep Reading

Transparent login between ASP.NET web sites

Consider this scenario: you have 2 or more ASP.NET websites hosted under different sub-domains which use the same SQL database for their “forms” type of authentication.  It would be nice for the user to login just once and transparently use the same authentication cookie again and again (if it is not yet expired).

Keep Reading

Newsletter sign up

Every couple of months we send out an update on what's been happening around our office and the web. Sign up and see what you think. And of course, we never spam.