mercurial/revset.py
changeset 35904 fc44c2657dc5
parent 35892 00a56c83ab64
child 35914 7a991241f586
--- a/mercurial/revset.py	Sat Jan 27 17:31:25 2018 +0900
+++ b/mercurial/revset.py	Sat Jan 27 17:46:37 2018 +0900
@@ -105,6 +105,9 @@
                 pass
     return None
 
+def _sortedb(xs):
+    return sorted(util.rapply(pycompat.maybebytestr, xs))
+
 # operator methods
 
 def stringset(repo, subset, x, order):
@@ -507,7 +510,7 @@
         b.add(getbranch(r))
     c = s.__contains__
     return subset.filter(lambda r: c(r) or getbranch(r) in b,
-                         condrepr=lambda: '<branch %r>' % sorted(b))
+                         condrepr=lambda: '<branch %r>' % _sortedb(b))
 
 @predicate('phasedivergent()', safe=True)
 def phasedivergent(repo, subset, x):
@@ -760,7 +763,7 @@
             src = _getrevsource(repo, r)
 
     return subset.filter(dests.__contains__,
-                         condrepr=lambda: '<destination %r>' % sorted(dests))
+                         condrepr=lambda: '<destination %r>' % _sortedb(dests))
 
 @predicate('contentdivergent()', safe=True)
 def contentdivergent(repo, subset, x):