changeset 4717:7b36f9728351

py3: use bytes for revset predicate registrations
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 09 Jul 2019 10:56:42 -0700
parents d587611d0c78
children 23323092f0a7
files hgext3rd/evolve/__init__.py hgext3rd/topic/revset.py
diffstat 2 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Tue Jul 09 10:56:42 2019 -0700
+++ b/hgext3rd/evolve/__init__.py	Tue Jul 09 10:56:42 2019 -0700
@@ -503,7 +503,7 @@
 
 ### Unstable revset symbol
 
-@eh.revsetpredicate('unstable()')
+@eh.revsetpredicate(b'unstable()')
 def revsetunstable(repo, subset, x):
     """Changesets with instabilities.
     """
@@ -516,7 +516,7 @@
     troubled.sort() # set is non-ordered, enforce order
     return subset & troubled
 
-@eh.revsetpredicate('troubled()')    # legacy name
+@eh.revsetpredicate(b'troubled()')    # legacy name
 def revsettroubled(repo, subset, x):
     return revsetunstable(repo, subset, x)
 
@@ -615,7 +615,7 @@
 
 
 ### XXX I'm not sure this revset is useful
-@eh.revsetpredicate('suspended()')
+@eh.revsetpredicate(b'suspended()')
 def revsetsuspended(repo, subset, x):
     """Obsolete changesets with non-obsolete descendants.
     """
@@ -625,7 +625,7 @@
     return subset & suspended
 
 
-@eh.revsetpredicate('predecessors(set)')
+@eh.revsetpredicate(b'predecessors(set)')
 def revsetpredecessors(repo, subset, x):
     """Immediate predecessors of changesets in set.
     """
@@ -635,12 +635,12 @@
     return subset & s
 
 
-@eh.revsetpredicate('precursors(set)')   # legacy name for predecessors
+@eh.revsetpredicate(b'precursors(set)')   # legacy name for predecessors
 def revsetprecursors(repo, subset, x):
     return revsetpredecessors(repo, subset, x)
 
 
-@eh.revsetpredicate('allpredecessors(set)')
+@eh.revsetpredicate(b'allpredecessors(set)')
 def revsetallpredecessors(repo, subset, x):
     """Transitive predecessors of changesets in set.
     """
@@ -650,12 +650,12 @@
     return subset & s
 
 
-@eh.revsetpredicate('allprecursors(set)')   # legacy name for allpredecessors
+@eh.revsetpredicate(b'allprecursors(set)')   # legacy name for allpredecessors
 def revsetallprecursors(repo, subset, x):
     return revsetallpredecessors(repo, subset, x)
 
 
-@eh.revsetpredicate('successors(set)')
+@eh.revsetpredicate(b'successors(set)')
 def revsetsuccessors(repo, subset, x):
     """Immediate successors of changesets in set.
     """
@@ -664,7 +664,7 @@
     s.sort()
     return subset & s
 
-@eh.revsetpredicate('allsuccessors(set)')
+@eh.revsetpredicate(b'allsuccessors(set)')
 def revsetallsuccessors(repo, subset, x):
     """Transitive successors of changesets in set.
     """
--- a/hgext3rd/topic/revset.py	Tue Jul 09 10:56:42 2019 -0700
+++ b/hgext3rd/topic/revset.py	Tue Jul 09 10:56:42 2019 -0700
@@ -28,7 +28,7 @@
         return x[1]
     raise error.ParseError(err)
 
-@revsetpredicate('topic([string or set])')
+@revsetpredicate(b'topic([string or set])')
 def topicset(repo, subset, x):
     """All changesets with the specified topic or the topics of the given
     changesets. Without the argument, all changesets with any topic specified.
@@ -76,7 +76,7 @@
 
     return (subset & mutable).filter(matches)
 
-@revsetpredicate('ngtip([branch])')
+@revsetpredicate(b'ngtip([branch])')
 def ngtipset(repo, subset, x):
     """The untopiced tip.
 
@@ -89,7 +89,7 @@
         branch = repo['.'].branch()
     return subset & revset.baseset(destination.ngtip(repo, branch))
 
-@revsetpredicate('stack()')
+@revsetpredicate(b'stack()')
 def stackset(repo, subset, x):
     """All relevant changes in the current topic,