joi, 15 august 2013

#7-8 - C implementation of command server API

There have been almost two weeks since my last blog post.

During this time I changed level 0 implementation after some advice, I built a
sketch for level 1 and started implementing some level 1 commands. Also I built
a doxygen documentation for project.

After sending the patchbomb to mercurial dev list, I got some reviews and new
ideas about level 0 implementation. I changed the rawcommand function to receive
the argument list that will terminate by a NULL pointer instead of counting and
passing the size of argument list.

Concerning the sketch for level 1 I got some reviews and we made an agreement on
how this level must work. We made a list of commands that I will would like to
build first (add, commit, push, pull, log, import/export, merge, verify).

One of those first commands that I already implemented is the log command which
has to handle huge mass of data. In my implementation I used an iterator-like
mechanism which gets from cmd-server a change set in one call and returns in a
structure the parsed data.

Meanwhile I started to build the doxygen documentation for a better concept
understanding. I think that it's a good way to navigate through the c-hglib API,
and an easier way to find the needed function.

joi, 1 august 2013

#6 - C implementation of command server API

With the midterm closing by, last week I had tried to show to the
mercurial community my work. From my point, the work on level 0 hglib
has come to an end. A confirmation from mercurial crew is still
required, so I am currently waiting for it.

To show the functionality for level 0 API, I followed all the stories
that Matt asked for, and I built those stories using just level 0 API.
Giovanni gave me some advice on how to build a switch case on main
file and to use system calls to create the proper environment where
the stories will be tested.

After I finished to build all those examples, I entered on refactoring
phase, to find and change the code before sending a patchbomb to
mercurial dev.
The patchbomb was sent and now I am waiting for the confirmation.
Meanwhile I will start sketching some ideas for level 1, command level
(function per command, returns results in native C datatypes).