Git and Subversion

Since the middle of this year I started to work more with GIT, basically to track my personal stuff (like scripts and etc) and found out that GIT is such an amazing tool to control your code.

Besides being very easy to work with it, creating and working with branches and being really fast, it’s a distributed revision control software, letting me doing commits at my laptop while I’m off-line and pulling/pushing changes from others when I want, sweet 🙂

But, at test project that I was working we have Subversion, and not GIT. I didn’t want to change it to GIT because everyone was already used to Subversion, and there was no such great justification to do the change, so I decided to search about something that could help me working with GIT at a Subversion repository, and found the git-svn, a really nice tool that turns working with Subversion + GIT a really easy job 🙂

To play more with it I decided to track my local Autotest repository with it, so I just did:

# git-svn clone svn://

With this I just cloned (did a checkout for Subversion users) the Autotest repository to be able to work on it locally, really easy. Just pay attention that this could take some time, because it’ll checkout every revision, and depending on how much revisions you have it can take a long time to finish.

So, yesterday I just decided to improve how we call the LTP test suite inside Autotest. To do this I just created another branch and turned my local code into it, like:

# git branch
* master
# git branch ltp
# git checkout ltp
Switched to branch "ltp"

After this I just made the modification and did the commit locally, like:

# vim client/tests/ltp/
# git commit -a

Now with the patch in my hands I just needed to send it to the Autotest mailing list, so, how could git help me with this? Simple:

# git-format-patch -p --stat --signoff last_commit_before_my_commit

This command just created the patch at a local file, with everything I needed (even with the signoff :). After this I just sent it to the mailing list, with another git command:

# git-send-email --to 0001-Add-support-to-run-another-test-script-at-ltp.patch

Very easy 🙂

So, today the patch was accepted and I wanted to get that update from upstream to my local repository, did this with:

# git checkout master
Switched to branch "master"
# git-svn rebase

Now that the patch was accepted and is already at my repository I just wanted to remove the branch I created, and this is also really easy to do:

# git branch -D ltp
Deleted branch ltp.

And that’s everything I needed 🙂

So now I can easily work with any Subversion repository by dealing it with GIT. I know that’s not the best solution, but for sure it can help if you need 🙂

That’s all!


Pointers to start Kernel development

Today I was looking on what I have related with kernel on my notebook and found many interesting pointers that could be interesting for those who are starting (or want to start) to develop code for the Linux kernel, here’s what I found:

So, for those who are interested in reading these links and start to developing code for the Linux kernel, have fun =)

Still alive :)

Let me put some life here again, since it’s quite a while since my last post 😛

Well, I was quite busy these last months, working a lot to test every Enterprise distros that IBM supports (for those who don’t know I’m currently working at IBM – Linux Technology Center, specifically at the Linux on Power Test Team) and at my free time I was always trying to find how to turn Autotest and Linux Test Project better, but forgot completely to post here :).

But, now I’m starting to get a little more time and also some more interesting stuff to post here ;). At my job I’m now moving to a new team at LTC that’s going to work with development of many Linux device drivers. I’m very happy to get this opportunity because now I finally can work and learn more with stuff directly related with kernel 🙂

Another great stuff that happened (and it’s not related with computer) is that I started to listen to the Nine Inch Nails band, and I really enjoyed it, you can see at my profile that’s almost beating Pink Floyd! If you like industrial music I really recommends you to take a look at it 😉 (it’s the kind of music that’s really good when you’re programming :).

Well, I guess that’s all for today, I promise to try to post more here 🙂