# HG changeset patch # User Yuya Nishihara # Date 1520198590 18000 # Node ID b77ff4fbe9ad2a27454f0edc9a9772bbc3128b28 # Parent 66250de006c68b9ef9019db29b33696b3dfa3965 py3: work around comparison between int and None in tagmerge diff -r 66250de006c6 -r b77ff4fbe9ad contrib/python3-whitelist --- a/contrib/python3-whitelist Sun Mar 04 16:13:46 2018 -0500 +++ b/contrib/python3-whitelist Sun Mar 04 16:23:10 2018 -0500 @@ -370,6 +370,7 @@ test-subrepo-deep-nested-change.t test-subrepo.t test-symlinks.t +test-tag.t test-treemanifest.t test-unamend.t test-uncommit.t diff -r 66250de006c6 -r b77ff4fbe9ad mercurial/tagmerge.py --- a/mercurial/tagmerge.py Sun Mar 04 16:13:46 2018 -0500 +++ b/mercurial/tagmerge.py Sun Mar 04 16:23:10 2018 -0500 @@ -73,8 +73,6 @@ from __future__ import absolute_import -import operator - from .i18n import _ from .node import ( hex, @@ -164,7 +162,7 @@ # before writing them # the position is calculated to ensure that the diff of the merged .hgtags # file to the first parent's .hgtags file is as small as possible - finaltags.sort(key=operator.itemgetter(0)) + finaltags.sort(key=lambda x: -1 if x[0] is None else x[0]) # finally we can join the sorted groups to get the final contents of the # merged .hgtags file, and then write it to disk