Migrate old codes from https://code.google.com/p/dodysw-hg