Friday, June 19, 2009

Making Kingston DataTraveller G2 bootable in linux

I bought a Kingston DataTraveller to transfer EasyPeasy onto my Asus EEE pc in place of it's Xandros operating system. After I downloaded the EasyPeasy iso and put it onto the usb stick with unetbootin I tried to boot into it from the AsusEEEpc but it would not boot from it. I ended up launching GParted. In that you can right click the usb drive and there is a dropdown that says "Manage Flags". I clicked that and clicked the checkbox next to the boot flag. After placing the iso on the drive again using unetbootin, it booted, and now I have ubuntu mobile on my EEEpc :)

Tuesday, June 9, 2009

Use Git to do your svn merges

I've been using git-svn as a frontend to svn. Git provides so much power that it makes it enjoyable to use source control. Despite the comment in the man pages of git-svn that says that it considered bad form to use git to do your svn merges, I have found it much more useful. The way I do my merges is that I just do

git checkout branchtomergeinto
git merge --squash branchtomergefrom

The --squash tells git to mash all the commits into one patch and not to commit, so that you can check it out first. This inevitably leads to some conflicts, so I then use

git mergetool

to go through and resolve all my conflicts using "meld". After you're all done fixing the conflicts and recompiling to make sure everything is good.

git commit

And type a message that will be appropriate in an svn context so maybe

git commit -m "Merging from funkycool branch r1500"

Then do your git svn dcommit. After doing a few merges out from trunk into a longer term project I was noticing that I was having to remerge alot of things I had formerly merged. This is because when you do a git svn dcommit git forgets about the tracking of the merges that you have done. I started hunting for a solution and found this article about using git grafts to restore svn merge history. Git grafts are awesome in that they let you declare what has been merged manually. By adding the git grafts for the merges you have done, the next time you merge out you will have far fewer conflicts. Git does it again.