Remove redundant hg code