Saturday, November 13, 2010

Inter-operation of Mercurial and Git

Recently, I had to incorporate into mynetworkfolders various fixes from the open-source gss base project. Unfortunately, when the initial version of mynetworkfolders was created, we didn't clone from gss and now we have two completely independent trees, one in mercurial (gss) and one in git (mynetworkfolders). Fortunately, there is a way to link the two repos, so that changes can easily be migrated from one to the other.

First of all, we need fast-export.

git clone git://repo.or.cz/fast-export.git

then create a new git repo that we 'll use to convert the mercurial repo into.

git init gss_git_repo
cd gss_git_repo
../fast-export/hg-fast-export.sh -r ../gss
git checkout HEAD

Now, we have converted the gss mercurial repo into the gss_git_repo Git repo.

Then, we fetch changes from this repo into the mynetworkfolders git repo.

cd ../mynetworkfolders
git remote add gss ../gss_git_repo
git fetch gss [gss_branch:new_branch]

The last option is not mandatory and is needed only if we want to fetch a particular branch from the gss_git_repo.
Now in the mynetworkfolders git repo we have a new branch containing the gss changesets. If we do a merge, all changes from the beginning of the two projects will be merged so we have a lot of work to do to keep only those changes needed. However after this step and a commit, a common node will be created in the mynetworkfolders repo, so from now on if we repeat the above procedure, only the new changes from gss will be fetched into mynetoworkfolders.

Saturday, October 23, 2010

Yet another how to convert an svn repo to git

If you don't have branches in your svn repo then converting to git is an easy task. Just use git svn and you are done. I not only had branches but I also had multiple projects in the same svn repo and didn't want to move all of them to git. So the first step is to use git svn but explicitly specify where the trunk, branches and tags are for the particular project I wanted to move.

git svn clone http://path-to-root-of-svn-repo -A authors.txt -t tags/myproject -b branches/myproject -T trunk/myproject myproject


Notice that under the root of the svn repo, I have trunk, branches and tags folders. Each project has its trunk under trunk/project, its branches under branches/project and its tags under tags/project. The first argument to the command above is the root of the svn repo and trunk, branches and tags of myproject are given as -T, -b and -t parameters. Nothing else worked correctly for my case. Notice also that you need an authors.txt file of the form

username = Firstname Lastname <email>

with all users that have committed in the svn repo. The process will abort if it finds a name that is not in the authors file and you will have to add it and run the command again.

After the command finishes (and it might take a while) we have our git repo under myproject. There is one problem though (actually they are two): All svn tags and branches are now git remote tracking branches. If we just push our git repo to a remote hosting site like github we 'll have only the master branch (previously svn trunk). So we have first to convert all previous svn tags to real git tags and the then push everything (master, branches and tags) to github.

git branch -r
will list all remote tracking branches in the newly created git repo. Those with name of the form tags/tagname are coming from svn tags. As Paul Dowman explains in his post, for each one we have to create a git tag
git tag tagname tags/tagname
and then delete the remote tracking branch
git branch -r -d tags/tagname

The script I wrote to do the conversion is


git branch -r |awk -F "/" '$2 {printf("git tag %s tags/%s\n", $2, $2)}' |sh
git branch -r |awk -F "/" '$2 {printf("git branch -r -d tags/%s\n", $2)}'|sh


After that step we connect the local repo with github
git remote add origin git@github.com:user/myproject.git
and push but don't forget --tags otherwise the tags won't be pushed.
git push origin master --tags
and push again with --all to push the branches
git push --all

Thursday, September 16, 2010

Testing GWT Designer

Google announced today on the GWT blog the availability of GWT Designer among other things coming from the Instantiations acquisition. I couldn't help trying it, of course, so I installed the Eclipse plugin and tried to add a DialogBox into an existing project of mine. The plugin created the skeleton code for the new class but when I clicked on the design tab to see the graphical editor, Eclipse crashed miserably. It just disappeared from my screen with nothing written in the log (how typical). I tried updating everything related to Eclipse and test again with no luck. I then tried to create a new project from the beginning with the same results. Google search didn't help either. Tomorrow I 'll try it on the office computer and see what happens.

Sunday, September 5, 2010

Nodify made it to No 5 in the utility category!

Nodify is our entry in the Node Knockout coding contest. It is a Web-based IDE for writing nodeJS applications in Javascript. Initialy, it was meant to be only for server-side apps that implemented a REST-like API but during the 48-hour contest, we decided that it is better for now to have a more general approach.
The results came out yesterday and we are No 5 in the utility category!!! Apart from that, we had some very encouraging comments from the voters and that is even more satisfying than the ranking alone. Anyway, Panagiotis says it all in the video, you can check the project itself or download the code to play with. It is open-sourced under the MIT Lincence.

...and thanks to all that voted for us.

Monday, August 30, 2010

Nodify, a web-based IDE for node.js applications

Nodify is a web-based IDE for writing Javascript code using the node.js framework. It was created by our team during the node knockout coding contest in 48 hours. Check it out and if you like it, vote for it. Thank you

Monday, August 23, 2010

paper.li and twittertim.es

paper.li and twittertim.es are services that take links from your twitter stream and present them in a newspaper format. I have to admit that the first time I saw them, I couldn't find any possible use for me. Then, I thought that I don't follow my twitter stream very closely due to lack of time (no I don't click on every link that you post, sorry) and those services offer a decent way to have a quick but complete look on what happened in my stream for the last 24 hours. I don't intend to do a comparison here (how boring!) but I like twittertim.es because they show which friend shared each link and which friend of a friend which probably is a hint about their ranking algorithm. On the other hand, twittertim.es does not allow the creation of newspapers from hashtags, which is something that paper.li provides, so I use the latter to follow news about topics that interest me. A suggestion for both services is to allow the creation of newspapers from twitter searches (it would be really useful, guys).

And now let me go back to my studying for the node.js knockout contest.

Thursday, August 5, 2010

Dear Vodafone

thank you for bringing me back to the era of 54k modems when a 5kbytes/sec download rate was reason to party. Next time you advertise your mobile internet service, please make sure that it is clear that you are joking. There are naive people like me that believe such advertisements and expect fast internet on their vacation. Because my vacation is the only time I need mobile internet and it is apparent now that you cannot provide it.

Wednesday, June 2, 2010

On Android VM performance as a success factor

Duncan's Journal (Android VM Performance is not a Factor)
VM performance will help but is not THE critical factor for Android 's success according to the author (I mostly agree).

Wednesday, May 19, 2010

GWT 2.1 milestone 1 with data presentation widgets

GWT 2.1 milestone 1 is available and it has business presentation widgets! More details here. I still use smartGWT for complicated widgets but now this may change.

Tuesday, February 23, 2010

Java is dead

I just came back from the 30st Athens OpenCoffee event. One more interesting event but the best part for me was when Brian Teeman of Joomla was asked by one of the attendants if Joomla was going to support other databases or other languages like e.g. Java. His answer was immediate: "Java, NO. Java is dead. And if it isn't dead, then it should be".

Saturday, February 20, 2010

Monday, January 18, 2010