Generalized generate
Rudimentary git support, implemented sync_git in generate and replaced hardcoded _get_hg_changeset() with no-op for git.