Saturday, December 18, 2010

"I do" or "I don't"??

Some how "marriage" and "death" are things that happen to other people.. It's really not something that you expect to happen to you (especially at 25!)

Wednesday, December 8, 2010

403 Forbidden!

"403 Forbidden" error is the one of the most ambiguous errors of SVN and the most frequently occurring too!

My earlier understanding was that it would typically occur only when the user did not have appropriate access rights to the svn path that he was trying to access.

But that's not the only reason. It could also occur due to a incorrect path.
It's kind of strange that we can checkout and browse the repository using this path but cannot commit to it!

You have to ensure that the letter casing is exactly the same as the repository name on SVN server.

For example, your working copy may work with the URL "https://server:8443/svn/Project/Trunk" whereas the server side URL would be "https://server:8443/svn/Project/trunk".
In this case, you need to use the relocate option of TortoiseSVN and relocate your working copy to the correct URL. You can also checkout the folder again if you have no uncommitted local modifications on your working copy.

So the next time you come across a 403, remember to check the letter cases of the SVN repository name!

Thursday, December 2, 2010

Defect & Code Traceability

In large projects, it becomes exceptionally difficult to maintain traceability between the code changes and the defects and features. This traceability enables us to easily switch between code changes, revert to earlier repository state, review & tracking of changes made with respect to a particular defect number or feature number.

There are several defect tracker & CM tool integrations available. SVN in particular is integrable with most of the popular defect trackers like
Being slightly partial to the user friendly Redmine, the tortoisesvn - redmine plugin is very very easy to start with.
Once you configure the plugin to work with Redmine, you can see all the Redmine tasks in Tortoise SVN.
If you want to see the changesets in Redmine, you will need to click on the Repositories tab and then Redmine refreshes the changesets (Bug has been reported)
Or you can write a refresh script which can refresh repositories whenever a commit is made in SVN.

Saturday, November 27, 2010

Locked File Reports from your working copy

In my effort to find a easier way to get the locked file list, stumbled on the "svn status" command.
What you essentially need to do is run this command with a verbose (-v) and get changes from repository (-u) options. This is similar to the TortoiseSVN "Check for modifications" option.

The catch here is, it needs to be run from the folder on which you need the report. So I partially checked out the root folder and ran this command! Works perfectly!

In the output, the files which are marked "O" are the locked one's.

So your command should be looking some thing like this:

working_dir_path> svn status -u -v>locklist.txt

Sunday, October 31, 2010

Getting list of Locked Files

From a Project manager or Configuration Manager's perspective, getting a report on all the locked files is quite a necessity. I did not come across any utility which could give me this functionality. Probably cause it needs to be run on the server side.
Anyways, what you can do is, pass on the following command to your SVN admin guy and ask ask him to send you a report. The default format is pretty messy, so it needs some excel programming to put the text report in a better format.

svnlook lock path_in_repository >D:\locklist.txt

Above command, needs the repository path for which to find the locked files and it will give you the report in a text file at D:

Thursday, September 2, 2010

RapidSVN Error: Error while updating filelist (Can't create tunnel: Invalid argument)

For some people in my team, I was getting this error in spite of having done all the configurations right (as mentioned in the earlier post ) - environment variable & config file changes
So I tried to retrace my steps by removing the variables (user name and password) from the environment variables and checking for the connectivity.
And it worked!
It was probably having some problem in creating the tunnel for the first time.
Once it created the tunnel and prompted me for the password for the first time, going forward it had no problems in taking the credentials from the environment variable.
So if you face somethings similar, I would suggest that you check for establishing the basic connectivity first.

Wednesday, September 1, 2010


I went back to web development after a long time... this time to put up a anniversary gift for my friend...

Check it out - Funrobics - Towards a Healthy & Fitter Life



Funrobics, run by Dr.Archana Upadhyaya is a really fun way to get yourself exercising!
Typically mundane exercise routines are made more engaging through a combination of Pilates, Yoga, Power Yoga and Aerobics.
Not only do you lose the boredom of going trhough the same old gym routine but also get to try out new routines all the time, specially designed for you by Archana.
Archana is a Reebok certified Aerobics, Step & Pilates trainer . She has also done certifications in Power Yoga, High Performance Core Training & is a certified ABS Fitness Trainer specializing in training Female Clients!
With all those certification, you are assured that you are in really good hands! :)

For more details, check out the site!

Sunday, August 15, 2010

Configuring RapidSVN over SVN+SSH

I spent a lot of time in trying to setup RapidSVN to work over SSH. Each time I would try to open a repository, it would throw up an error of "Cannot create tunnel: The system cannot find the file specified." The problem is that RapidSVN does not know how to handle SSH...

After searching a lot, I chanced upon Diogo Gomes's blog on Using svn+ssh with RapidSVN
Diogo suggests using Plink.exe but the Putty session started hanging and there was the problem of the Plink window opening up, each time RapidSVN would try to connect to the repository.

A simpler solution worked for me, using TortoisePlink.exe. This solution also takes care of the password caching by passing the username and password directly to the TortoisePlink through a environment variable. If you do not want to pass the credentials, simply avoid passing the parameters in the environment variable.

So here goes...

Step 1 : Add TortoisePlink.exe path to the Environment Variable

Variable: SVN_SSH
Value: C:\\TortoisePlink.exe -l [username]-pw [password]
* Please note the "\\" in the path and the parameter for username is a small "el".

Step 2 :The same path needs to be added to the Subversion config file. You can locate this file in Application Data/Subversion/config
# ssh = $SVN_SSH C:/TortoisePlink.exe
* Please note the "/" in the path.

Two simple configurations and you are set!

Wednesday, July 14, 2010

When to Branch and Tag?

Very often there is a confusion as to when we should branch and tag. This confusion mainly arises from the fact that SVN treats "Branch" and "Tag" in the same way in the back end. The difference lies in how the user treats that branch or tag.

Tag

  • A tag is just a "snapshot" of a project in time.
  • Tags are similar to the concept of a “label” in VSS
  • Tags are commonly used to label or mark a particular released code
  • Tagged code should not be modified
  • If modifications are required, it should be done by creating a branch

Difference between branch & tag
  • SVN treats a branch & a tag as a copy of the code
  • Internally there is no difference between a tag & branch
  • Difference lies in usage of branch & tag
  • Branches are meant for development of a new line of code
  • Changes should not be made to tags

Space utilization
  • Direct copies are not made
  • SVN uses concept of “cheap copies”
  • The new files are links from the old files
  • Hence branching & Tagging are time & space efficient

Wednesday, March 24, 2010

Branching in Subversion

Subversion has a very powerful branching and merging facility with recursive merges, feature branches, and tree merges. But before starting with the actual branching & merging, you need to fix on the branching & merging strategy.

Branching
A branching strategy should first focus on deciding what a branch represents. Common approaches to branching are:

Release based - every release is a new branch.






Branching by Project Phase - Development/ Test/ Production


Branching by Variant - Some products are built for various technology platforms. The branching strategy could hence depend on the architecture of the product.


The above mentioned strategies can be used in a combination, based on the project requirement. For example, a complex product built for Windows and Linux platforms could have a branching strategy as shown below.


Using Tortoise SVN for Branching
Tortoise SVN has an excellent help document on the branching and merging. You can also refer the SVN book for the same. While branching, you simply have to right click on the root folder from where you want to create branch and provide the branch path and name.


Best Practices:

  • Baseline code should be in "trunk" folder
  • All Branches should be created in a "Branch" folder
  • Branching and merging strategy should be decided before hand to avoid chaos later.
References:



    Tuesday, February 16, 2010

    Snaps from my cell

    These days, I have become addicted to clicking away with my cell camera... Considering that it's the most convenient way to capture all those special moments that you witness, each day of your life...

    Aaaaaaaah! Trapped! ;) A very interesting pic of the lift in my building...








    Rise and shine! The morning sun peeping out from the mountains...