Fix compatibility with hg 2.8