diff hgext3rd/topic/evolvebits.py @ 4814:48b30ff742cb

python3: use format-source to run byteify-strings in .py files Using the format-source extension smooth out the pain of merging after auto-formatting. This change makes all of the Evolve test suite pass under python3 and has added benefit of being 100% automated using mercurial's `byteify-strings` script version 1.0 (revision 11498aa91c036c6d70f7ac5ee5af2664a84a1130). How to benefit from the help of format-source is explained in the README.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 06 Aug 2019 15:06:38 +0200
parents 6aff4bb3970d
children 967e9a87e82d
line wrap: on
line diff
--- a/hgext3rd/topic/evolvebits.py	Tue Aug 06 15:06:27 2019 +0200
+++ b/hgext3rd/topic/evolvebits.py	Tue Aug 06 15:06:38 2019 +0200
@@ -78,8 +78,8 @@
     newer = obsutil.successorssets(repo, obs.node())
     # search of a parent which is not killed
     while not newer:
-        ui.debug("stabilize target %s is plain dead,"
-                 " trying to stabilize on its parent\n" %
+        ui.debug(b"stabilize target %s is plain dead,"
+                 b" trying to stabilize on its parent\n" %
                  obs)
         obs = obs.parents()[0]
         newer = obsutil.successorssets(repo, obs.node())
@@ -88,7 +88,7 @@
         # we should pick as arbitrary one
         raise MultipleSuccessorsError(newer)
     elif 1 < len(newer[0]):
-        splitheads = list(repo.revs('heads(%ln::%ln)', newer[0], newer[0]))
+        splitheads = list(repo.revs(b'heads(%ln::%ln)', newer[0], newer[0]))
         if 1 < len(splitheads):
             # split case, See if we can make sense of it.
             raise MultipleSuccessorsError(newer)