[PATCH 2 of 7] merge: use scmutil.intrev() to sort ctx objects

Yuya Nishihara yuya at tcha.org
Sat Jun 3 10:39:26 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1496484079 -32400
#      Sat Jun 03 19:01:19 2017 +0900
# Node ID aee024abcb7e2abcadd612cc736c93639cc275e0
# Parent  53c0c2e03be2c9c544f2c9cfeeab0e8122253d00
merge: use scmutil.intrev() to sort ctx objects

This moves wctx to the last, but that shouldn't matter. Only the order of
stored revisions is important.

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)


More information about the Mercurial-devel mailing list