hg meme: hours of the day I work

I started using Mercurial for a new IOSA subproject. Our public repository is hosted at sharesource.

In a geeky moment, I wrote this one-liner (splitted in two lines for your browsing pleasure):

LC_ALL=C hg log | grep date: | awk '{ print($5) }' | \
awk -F ":" '{print($1)}' | sort | uniq -c

Update: added LC_ALL=C which forces hg commands to English, so you don’t have to change "date" to your language.

It should print out the hours of the day you work most on your code (at least if you are the compulsive edit/commit type), like this:

       4 00
       2 16
      11 17
       1 18
       2 19
       1 20
       1 21
       3 22
       8 23

(hours are on the right)

BTW sharesource is the fastest source hosting service ever. In half an hour my project was accepted and I was pushing and pulling from the public repository. Try it if you need Mercurial hosting (but they give also SVN).

Pubblicato da

Stefano Costa

Archaeologist, I study the Late Antique and Early Medieval/Byzantine period on the northern side of the Mediterranean, focusing on pottery usage patterns. I'm also involved in open source and open knowledge communities, like OSGeo, the IOSA project and the Open Knowledge Foundation.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.