diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -801,7 +801,7 @@ def manifestmerge(repo, wctx, p2, pa, br # manifests fetched in order are going to be faster, so prime the caches [x.manifest() for x in - sorted(wctx.parents() + [p2, pa], key=lambda x: x.rev() or -1)] + sorted(wctx.parents() + [p2, pa], key=scmutil.intrev)] if followcopies: ret = copies.mergecopies(repo, wctx, p2, pa)