diff mercurial/revset.py @ 45701:b90d7e7f39db

revset: fix sorting key of wdir revision It would go wrong on Python 2, and would crash on Python 3.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 09 Oct 2020 19:19:10 +0900
parents 17a12f53dd72
children 99b8b73eb622
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Sep 09 16:18:26 2020 +0900
+++ b/mercurial/revset.py	Fri Oct 09 19:19:10 2020 +0900
@@ -2287,13 +2287,13 @@
 
 
 _sortkeyfuncs = {
-    b'rev': lambda c: c.rev(),
+    b'rev': scmutil.intrev,
     b'branch': lambda c: c.branch(),
     b'desc': lambda c: c.description(),
     b'user': lambda c: c.user(),
     b'author': lambda c: c.user(),
     b'date': lambda c: c.date()[0],
-    b'node': lambda c: c.node(),
+    b'node': scmutil.binnode,
 }