Mercurial > hg-stable
changeset 37930:fe148d7544a4
cvsps: wrap cmp methods (deprecated) in functools.cmp_to_key
Differential Revision: https://phab.mercurial-scm.org/D3484
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 27 Apr 2018 01:24:04 -0400 |
parents | a38ac7ec8e03 |
children | dd071b34e60b |
files | hgext/convert/cvsps.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/cvsps.py Fri Apr 27 01:18:43 2018 -0400 +++ b/hgext/convert/cvsps.py Fri Apr 27 01:24:04 2018 -0400 @@ -6,6 +6,7 @@ # GNU General Public License version 2 or any later version. from __future__ import absolute_import +import functools import os import re @@ -653,7 +654,7 @@ return 0 for c in changesets: - c.entries.sort(entitycompare) + c.entries.sort(key=functools.cmp_to_key(entitycompare)) # Sort changesets by date @@ -706,7 +707,7 @@ d = c(len(l.branchpoints), len(r.branchpoints)) return d - changesets.sort(cscmp) + changesets.sort(key=functools.cmp_to_key(cscmp)) # Collect tags