Bug 961279. Fix needed in order to use hg 3.1.2. r=catlee