A for of http://oserl.hg.sourceforge.net/hgweb/oserl/common_lib