added first finished version for hg packagesource