Reduce number of hg calls