Monday, June 20, 2011

Using GIT with Subversion

In this post I will go through how to use git together with subversion side by side. Lets say your working in project which uses subversion as the SCM. But you and your team is asked to implement a CR. Now you have a requirement to share the code between your team members while you are working on different parts of the CR. One way is to commit changes to main repo. But if you have CI this will lead to build failures which is not good. So the other option is to use a searate repo for you requirment. So I have choose git for this. Its because it will not conflict with your svn metadata. And its distributed, therefore you don't need to setup a seperate server for this.

Here how you do it:
1. First tell one of your team member to checkout the project from subversion.

2. Then create a git repo for your project.

3. Create a .gitignore file and add the following line to avoid .svn metadata folders getting into to your git repo.

.svn/

4. Now add all files you want to track onto git index. Add the rest of the files you don't like to track by git in to ignore list.

5. Then commit the changes to the git repo.

6. Now tell the other members to take a copy of your .git folder and past it into their project folder. After doing that they can do a hard reset which will sync the working tree with the git repo that was just copied.

7. Now they need to add your repo as a remote repo. You need to share your project directory to do this.

8. Then they can do a fetch and do a merge to make sure it works fine.

9. Now you could add them as remote repo as well and do step 7 to make sure its working.

10. Now you all can work on your working copy as you wish and commit things into your local repo when you think it's done and ok to share with other members.

11. To get your changes they need to do a fetch and merge.

12. If they get a conflict during the merge git will not commit the changes. So they need to resolve them before committing. One way to do it is by manually resolving the conflict by using git merge tool. Other way is checkout using --ours or --theirs options. The first will keep the original file and ignore the remote changes. The second will do the opposite. After resolving the conflicts you need to add the files into the index and commit the merge changes.

13. If change your mind and want to revert the merge because you got conflicts, then do a hard reset which revert the merge.

14. When its time to commit changes to subversion, then you can do it using your favorite subversion tool. This will not be a big task since you have the svn metadata. One thing important is to do this commit by one person always. Other wise you see conflicts because you have the same change in your working copy with different subversion metadata since you have taken those changes from git. But its matter of ignoring those conflicts since you know they are not and committing the changes you want to subversion.

If you get things configured correctly you will save lot of time in applying patch files and copy past code here and there. But if you not get it configured correctly then you will loose lot of your time on just trying to share the code. Time is money for your managment ;).

Sunday, May 1, 2011

Skyline movie sucks

Watching the skyline movies was a total wast of time. Thank god it was only 1hr 30min :D. Its a movies with lots of special effects and no story behind it. I preffer to watch over the Transformers series or The Independence Day over this one.

Thursday, April 7, 2011

Welcome WindowBuilder

Good news for all Java GUI Developers. Finally the day has come where we can enjoy the WindowBuilder when creating Swing GUIs. This was a commercial product some time back but now its taken by google and its OpenSource. So lets start using it and help the community to make it more feature rich.

More information can be found at Google Code Blog
The plugin can be downloaded from http://code.google.com/javadevtools/wbpro/

Enjoy.

Saturday, January 8, 2011

Using GIT on windows without starting a new cmd

If you install the portable GIT from http://code.google.com/p/msysgit/ for windows you will need to set the installation path in to your PATH variable in windows. And when you start git from the command line it will open another command line which is opened in your home directory. This was something made me go crazy so i though to find away to run git within the command line i opened like i do with SVN. Well i didn't try the windows installation in msysGit site and try the same thing with the command line because i always prefer zipped installations on windows. I guess that's some thing you can try :).

So when going through the git-cmd.bat file i found away to get it running as i wanted. Here is what you need to do.

Create the following environment variable with the values :
  • git_install_root = "[folder where you extracted the zip file]"
Add the following entries to the PATH variable :
  • %git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;
Now open the new command line and type git. You will get the git help text :).

Saturday, December 12, 2009

Installing MonoDevelop 2.2 with debug support


First of all the mono which is in fedora12 repository doesn't have a working debugger. So i had to build it my self using the latest monodevelop-2.1.2 source code. Follow the below steps and you will have a working mono develop with debugger support (I am using mono-2.4 which doesn't contain the soft debugger).


  1. Extract the monodevelop-2.1.2.tar.bz2 and run ./configure script. make sure you install the required libs and their devel packages as well.
  2. Run make.
  3. Run make install.
  4. Extract monodevelop-debugger-mdb-2.1.2.tar.bz2 (Mono Debugger support).
  5. Set the PKG_CONFIG_PATH to point the directory which contains monodevelop.pc file using the command export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  6. Run ./configure script.
  7. Run make
  8. Run make install.
You can do the same steps 5, 6, 7, 8 if you need to install the GDB Debugger support as well.
Your done :).



Blogged with the Flock Browser

Tuesday, December 8, 2009

How to run flash-plugin version 10 with flock and firefox on Fedora

It seems most of the users have a problem running Flock and Firefox with flash-plug-in version 10. This can be avoided if you install Firefox version which is provided by fedora it self. But for flock you can't do that. So as i found in this forum it seems the following solution works on fedora for custom Firefox and Flock installations.

Delete the following files from the Firefox or Flock installation folder.
  • libfreebl3.chk
  • libfreebl3.so
Good luck :)

Saturday, June 27, 2009

Compiling Amarok2 on FC9

I am sharing my experience on compiling amarok2 on fc9. As amarok wiki (http://amarok.kde.org/wiki/Compiling:2.0) says you need to have the those dependecies and their devel packages installed in your system. Well installing mysql embedded is bit of a trouble since i couldn't find on fc9 repos. So what i did was i got it installed from fc10 update site.

[fc10-updates-newkey]
name=Fedora 10 - i386 - Updates Newkey
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/10/i386.newkey/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f10&arch=i386
enabled=0
gpgcheck=0
gpgkey=

In addtion you will need the following 2 rpms installed in your system qtscriptbindings-0.1.0-5.fc9.i386.rpm and qtscriptgenerator-0.1.0-5.fc9.i386.rpm. You can download those from the following urls which i found from http://rpm.pbone.net/ (A great rpm search engine).

ftp://ftp.univie.ac.at/systems/linux/fedora/updates/9/i386.newkey/qtscriptbindings-0.1.0-5.fc9.i386.rpm
ftp://ftp.univie.ac.at/systems/linux/fedora/updates/9/i386.newkey/qtscriptgenerator-0.1.0-5.fc9.i386.rpm

After that compile it as described in amarok wiki.

But sad say friends, as i felt it was not worthy of the time i spent on compiling amarok2 :(. Because i didnt like the inherited KDE4 theme looks and the missing equalizer :(. Any way this might help the people who still want to install amarok2 on fc9.