Tuesday, September 13, 2011

How to merger from feature branch to release branch

In this post I would like to share how we can merge correctly in subversion

Step 1

Let say we have a feature branch we are going to implement a new feature we can simple create a branch from trunk from following svn command

svn copy http://abc.com/svn/abcApp/trunk http://abc.com/svn/abcApp/branches/feature

Step 2

now you need to check out this feature branch and do your feature implantation

svn co http://abc.com/svn/abcApp/branches/feature

Step 3

Commit your code change in to feature branch

svn ci Newclass.java -m "new features"

Sending       Newclass.java
Transmitting file data ..
Committed revision 100.

Step 4

After QA this feature if it is correct according to the requirement now you can merge these changes to release branch, now your are in the working copy of release branch , that might be in the release server

svn info

Path: .
URL: http://abc.com/svn/abcApp/branches/release
Repository Root: http://abc.com/svn/
Repository UUID: 33c534c8-f253-11db-b5f7-c2633749d7dc
Revision: 35191
Node Kind: directory
Schedule: normal
Last Changed Author: abcd
Last Changed Rev: 101
Last Changed Date: 2013-06-21 14:05:42 +0530 (Fri, 21 Jun 2013)

svn merge -r99:100  http://abc.com/svn/abcApp/branches/feature .

--- Merging r99 through r100 into '.':
U    Newclass.java

Step 5

Commit just update new stuff to release branch

svn ci -m "new features to release branch"

Sending      Newclass.java
Transmitting file data ..
Committed revision 102.

Sunday, September 11, 2011

Shortcut launcher for IntelJ Idea in Ubuntu

First starting from command prompt, Launcher is a fascinating way to start programs by a single click in Ubuntu.

We can add launchers either in the Desktop or on panels.
To add one, right click the panel and select "Add to panel...", you will get the "Add to panel" window.
Here double click on "custom application launcher".

On the "Create launcher" window, for name type "Idea" and for the  command type:
/bin/sh -c 'export JDK_HOME=path for Java home && path for /bin/idea.sh'
/bin/sh -c 'export JDK_HOME=/usr/lib/jvm/java-6-sun  && /usr/local/idea/bin/idea.sh'

Add idea icon as follows

By clicking the launcher icon on the "Create launcher" window you can select an image file to add as the icon of your launcher. For Idea you can find its image formIdea_Home/bin/

Happy coding!

Wednesday, September 7, 2011

How to get the svn logs in two tags

You can first find the revisions of the tags:

svn info /tags/19_08_2011_PR/ | grep 'Last Changed Rev'
Last Changed Rev: 14082

svn info /tags/31_08_2011_PR/ | grep 'Last Changed Rev'
Last Changed Rev: 14382

You're not really looking for a diff, you are looking for a log. So do a verbose log between those revisions and you will get the commits including changed files.

svn log -v -q -r 14082:14382 /trunk