Archive

Posts Tagged ‘subversion’

Cleaning an entire subversion working folder from ‘.svn’ folders

May 12th, 2009

Rarely I need to clean an entire folder from all the hidden ‘.svn’ folders which makes it a working copy of an existing repository. Unfortunately my projects tend to be large in the number of files and fairly complex. When I upgrade the project, say from Ektron 7.0.4 to Ektron 7.65 SP2, there are a lot of changes in the files. In the upgrade process, some folders loose their ‘.svn’ subfolders which makes it difficult to use the ‘SVN Update’ + ‘SVN Commit’ walk in the park method. What we need is a ‘SVN Reintegrate’ option, lets create one.

subversion_svn_reintegrate

Until now, what I end up doing is removing all the ‘.svn’ subfolders, checking out the project to another folder, removing all the files from the checked out folder (SVN Delete), copying over all the current set of files/folders, and checking the whole thing back in to the SVN repository. This works well but it requires some serious file manipulation efforts. Here are two usefull tools I just recently discovered that can help tremendously with this process:

1. Cleaning an entire subversion working folder from ‘.svn’ folders:

Ryan Christensen describes how to remove all .svn subfolders from a SVN working copy. In short, you need to create a small ‘.cmd’ file that will live in the top folder that you want to detach from SVN and write this command in it:

for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *svn') do ( rd /s /q "%%i" )

I saved it as cleansvn.cmd and run it from a command line window after changing the current directory to the project folder. You will need to wait until the TortoiseSVN checks all the subfolders because it keeps a bunch of info in cache and with this util – it doesn’t refresh veru quickly. But it works great.

2. The new Rsync for Windows, called RichCopy:

Apparently, Microsoft has recently (April 2009) published this free utility called RichCopy which comes to replace the RoboCopy GUI tool from 2006. According to the article, this utility is also many times more efficient and handles multi threading, network connections, etc. I tried it and it worked great for me.

Here are the new steps for my ‘SVN Reintegrate’ procedure:

  1. Backup all working copies before proceeding
  2. Clean working copy from all ‘.svn’ folders
  3. Checkout latest project from SVN repository to another folder (not a subfolder)
  4. Use RichCopy to copy over all the files, these are the settings:
    1. Source: the new clean working folder
    2. Destination: the latest SVN checked out folder
    3. Use the ‘Purge’ option
    4. Exclude all ‘.svn’ folders from this process
  5. SVN Commit the SVN folder that was overwritten by the working folder

A bit confusing but if you know what you are doing it can save you a few white hairs. Enjoy!

Ektron, Web Development , ,

Will Visual SVN Server remain a for-Free product?

March 30th, 2009
Comments Off

After writing about Visual SVN Server, I was wondering will the software remain free… Since I was thinking to myself, what is the logic behind giving it away like this. I already though of some reasons but I wasn’t sure and their website did not indicate any future plans but niether it indicated that the product will remain free. Hence I emailed the sales team and got this response back:

we’ll always keep VisualSVN Server free with the current set of functionality. We’re not going to take money in future for the functionality that we distribute free of charge now.

This means that we should expect another version that is a paid version of this product. It also means that we can certainly enjoy using this version without getting blocked from future upgrades or locked in to this solution with no way out.

Web Development

Recommended: Visual SVN Server, now with Subversion 1.6

March 27th, 2009
Comments Off

Sometimes we are so busy with our projects that we miss interesting changes, some may influence us positively. Here is a change that I wanted to share with you: new subversion version 1.6 and Visual SVN Server.

In the last three years we have used both VSS that integrates seamlessly with Microsoft’s Visual Studio, of-course and subversion which can be handled simply from the Windows Explorer window under windows or by using the simple but useful subversion client. Through our development years, it was subversion that took over all our source code repositories. It was simple to use, great to manage, and most importantly – reliable.

Just recently I needed to use the ‘merge’ feature and I discovered that it was only available in version 1.5 and on. So, I went on trying to upgrade the subversion binaries to the latest stable on an Ubuntu server. If you have been reading my blog, you already know that I do not like Ubuntu, well this is the only Ubuntu server left in our arsenal. To make a long story short, after trying to upgrade but giving up since it requires a major Ubuntu release upgrade, I decided that I should look somewhere else. This is where I turned to Visual SVN Server.

After purchasing a copy of Visual SVN – which is a great little plugin to Visual Studio that allows you to integrate with your subversion repository seamlessly and efficiently, we noticed that the same company created Visual SVN Server. Hence, I tried it. I can start by saying that it was well worth it. Yes, Linux is great but for the simple stuff that we do with SVN a windows box will do just fine. Not to mention that with Ubuntu it is a nightmare and waiting for CentOS to adopt the latest version of subversion may take some time, Visual SVN Server is very convenient. If you check their download page, the latest download-able version is already using subversion 1.6. Great!

So, if you are looking to build a subversion repository or in need of upgrading due to need of features/bug fixes – I strongly recommend upgrading to Visual SVN Server.

By the way – moving your existing repositories is a no brainer, especially with Visual SVN’s repository import feature.

Web Development , ,