Friday, June 6, 2014

GSoC 2014, Week #3: Going good

Hello again everyone,

This week went fairly smooth. I got my computer parts in and to my despair there is an issue with the motherboard. So! Hopefully this Sunday I'll be able to see if I can't solve this problem and have my main computer alive and functional once and for all!

Not much can be listed as being accomplished but a decent amount of work was done this week regarding layman:

1.) Refined current code:

       I'm sure you're all thinking: "But Devan, didn't you do that last week? How much code could you possibly refine before it's perfect?". Well, forget that. Because code can always be refine in some way. Especially with something as expansive as layman. Throughout this week if I had to think about it I would probably say that I used git far more than I did anything else throughout this week.

      To avoid dragging out ideas and beating them into your brain to the point where your eyes glaze over I'll spare you most of the details on my git adventures and cover the main things that I've been getting familiar with throughout this GSoC involving git.

  • Using git rebase: Although I know git rebase is used for far more than I use it for, I have been using git rebase to handle my commits. If I broke something in a previous commit I would find the necessary SHA of the commit before the commit I wanted to repair and then I would run: git rebase -i <SHA>, once run it will bring up a text editor that will list all the commits up to that SHA. If I wanted to reword a commit I would just replace pick with reword, if I wanted to repair my mistakes from any commit I would replace pick with edit. This would also allow me to reword a commit if I so desired by using the command git commit --amend. After finishing all my repairs I would run git rebase --continue which will take me to my next edit, reword,... until it hit pick which will just continue on until you successfully rebase. After doing that you have to push all your commits to the branch by running git push --force and you'll have fixed your commits and pushed them to your remote repository!
  •  Breaking up a commit into two commits: So say I made a commit that I thought at the time was good but then I realized it'd be better as two separate commits. Well, I would rebase and edit the commit I wanted to break up into two (or more). Once you get to that commit you should run git reset HEAD~ which will reset your current HEAD to the one prior to that commit. So now your changes are "unrecorded". You can then continue to make your changes and break them up into multiple commits as you would normally. Once you're all done simple run git rebase --continue, and feel good about yourself for doing a job well done!
By making use of these two topics I've been fixing up and refining the code without having to make different commits admitting I messed up (I mean, come on! Who wants to admit that they forgot an indentation here or there on multiple occasions?).

2.) Updated the repository.dtd file:

       Although my understanding and experience with XML is slim to none, I can at least explain what was done here and why. If you look here you will see the overlay where the layman overlay repositories get their XML definitions. The structure of the repositories.xml is defined in its .dtd file. The changes I made to the repository.dtd include changes to add information for IRC channels, and overlay branches.

3.) Documentation updates:

       If you're using layman then it's extremely likely that you're also using Linux. More specifically, Gentoo. So you should know that if you run man layman you'll get the manual for layman which includes pretty much all you need to know about how layman works, and the configuration options you can modify to do certain things.

      In preparation for the new release of layman, the documentation has been modified to reflect the changes I've been adding to layman throughout these past weeks and some cleaning up for the man page as well.

Goals for next week:
  • Finish adding branch support for overlay installations (testing included).
  • Get the patch I created for the .dtd modifications to be applied to the repository.
  • Prepare for a new layman release.
To anyone interested the source code and my commits can be found on
git.overlays.gentoo.org/gitweb/[1][1] or on github.com[2] on layman's gsoc2014 branch.


  [1]http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=shortlog;h=refs/heads/gsoc2014
  [1][1] Because my main computer has been down I haven't been able to push
            the commits to this repo.
  [2]https://github.com/twitch153/layman/tree/gsoc2014

 See you next week!

With regards,
    Devan Franchini (twitch153)

No comments:

Post a Comment