Due to the similarity of the basic Git and Mercurial data objects, the effort to solve such problems should be the same ...