Wednesday, January 05, 2011

How do I get a list of commit comments from CVS after the given date or change?

The short answer is ... use subversion or git instead of cvs, and you will get your answer pretty quickly.

You may have made a bunch of changes to a number of files in a project, and made sure that every commit (usually at the file level) was accompanied by a comment of what was changed.

Then you may have asked yourself, is there a way to get a list from CVS of these comments on changes since some particular version?

Well, I had the same problem and here is how I quickly got all of the comments out of cvs from a given revision until the latest:
$ mkdir ~/repo
$ cd ~/repo
$ mkdir cvs
$ cd cvs
$ scp -pr geek@avoid.cvs.org:/cvs/CVSROOT .
$ mkdir -p my/favorite
$ cd my/favorite
$ scp -pr geek@avoid.cvs.org:/cvs/my/favorite/project .
$ cd ~/repo
$ mkdir -p ~/repo/svn/my/favorite/project
$ cvs2svn -s ~/repo/svn/my/favorite/project/src ~/repo/cvs/my/favorite/project/src
$ mkdir ~/work
$ cd ~/work
$ svn checkout file:///home/geek/repo/svn/my/favorite/project/src/trunk ./src
$ cd src
$ # get the comments made from revision 5 until today
$ svn log -r 5:HEAD
$ # get the comments made from 2010-07-03 until today
$ svn log -r {2010-07-03}:HEAD
The basic idea is to just use svn or git instead of cvs :-)
And that can be done by converting the cvs repo to svn or git using cvs2svn or cvs2git, which we should be doing anyway. It got my my answer within about three minutes because I had a small repository.

Hope that helps.

Monday, January 03, 2011

Problems with a Vietnamese character on mobile devices

Currently I am running version 5.0.0.714 of the BlackBerry OS on my bold 9700, because my carrier has not released the latest version 6 of the OS for my phone. Still version 5 is pretty mature, and so I was surprised to run across this bug with rendering a particular Vietnamese letter.

On my BlackBerry, whether I am using the blackberry browser, gmail, blackberry's messenger, or opera mini, the blackberry renders the character , which is unicode U+1EDD, as the character , which is unicode unicode U+1EDB.

Here is a blown up screenshot of the two _different_ characters "ờ ớ" on the BlackBerry noted above using blackberry's messenger application:
This is the same way that it looks in all of the applications noted above using BlackBerry OS 5.0.0.714.

Curiously, I also found that this same rendering problem is happening on my Android phone for the same email. And the issue is also happening using with Android web browser in pages like this one. So it looks like several mobile platforms are having this issue. And now that I think of it, this blog post would be much harder to understand if you are reading it on a mobile device which has this bug.

On the other hand if I use LogicMail, which is currently the most popular open source email client available for the BlackBerry, and I turn on the "Unicode normalization" feature in the configuration, here is the resulting screen shot from the same email:
What is nice about this feature of LogicMail is that it improves your ability to read Vietnamese emails whether you are running older versions of the OS or not, so anyone whose carrier (or company) has locked them into older versions of the BlackBerry OS, can still get the benefit of LogicMail's unicode normalization option. Open source is great.

I wonder if this is still an issue with BlackBerry OS 6. If it is then these two different characters will look the same: ờ ớ

Maybe you can let us know in the comments below.

Incidentally, this character must be from the same family of characters which appear to be quite popular on reddit.com.

Tuesday, November 30, 2010

Fedora - Google Earth: /opt/google-earth/libIGGfx.so ... Permission denied

Your install of Google Earth went fine ...

But then when you try to run Google earth, you get an error something like this:
/opt/google-earth/libIGGfx.so ... Permission denied.

Or you may find this in your /var/log/messages:
Nov 30 09:49:42 lost setroubleshoot: SELinux is preventing /opt/google-earth/googleearth-bin "execmod" access to /opt/google-earth/libIGGfx.so. For complete SELinux messages. run sealert -l e4e45dc0-14cf-49dc-af60-8c8e7e916bdf

Don't worry, just run as root:
# cd /opt/google-earth
# for file in `ls /opt/google-earth` ; do echo "SeLinux type in " $file; chcon -t textrel_shlib_t $file; done
You may still have problems like I did if you are behind a proxy.

so I added this to the beginning of the command to launch google earth:
env http_proxy=http://my.favorite.proxy.com:8080

so now the launch command is:
env http_proxy=http://my.favorite.proxy.com:8080 /opt/google-earth/googleearth %f

Hope that helps.

Thursday, November 25, 2010

Khát Khao Dòng Nước

Bài này làm tôi yên lòng ...


* Here are the chords and lyrics.
* Lượm lời bài với hợp âm ở đây.

Enjoy.
Hãy vui long hát với à.

Wednesday, September 08, 2010

PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in /var/www/html/mediawiki/includes/Exif.php

Have you ever gotten an error like this:

PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in /var/www/html/mediawiki/includes/Exif.php on line 1018, referer: http://my.favorite.wiki.info/mediawiki

Well, do not worry, here is how you can fix it ... Just edit the LocalSettings.php for your wiki, and change the line that says "ini_set( 'memory_limit', '20M' );" to something like "ini_set( 'memory_limit', '32M' );".

Don't you just love magic numbers in your code?