Mercurial > evolve
comparison 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 |
comparison
equal
deleted
inserted
replaced
4812:67567d7f1174 | 4814:48b30ff742cb |
---|---|
76 obs = repo[p] | 76 obs = repo[p] |
77 ui = repo.ui | 77 ui = repo.ui |
78 newer = obsutil.successorssets(repo, obs.node()) | 78 newer = obsutil.successorssets(repo, obs.node()) |
79 # search of a parent which is not killed | 79 # search of a parent which is not killed |
80 while not newer: | 80 while not newer: |
81 ui.debug("stabilize target %s is plain dead," | 81 ui.debug(b"stabilize target %s is plain dead," |
82 " trying to stabilize on its parent\n" % | 82 b" trying to stabilize on its parent\n" % |
83 obs) | 83 obs) |
84 obs = obs.parents()[0] | 84 obs = obs.parents()[0] |
85 newer = obsutil.successorssets(repo, obs.node()) | 85 newer = obsutil.successorssets(repo, obs.node()) |
86 if 1 < len(newer): | 86 if 1 < len(newer): |
87 # divergence case | 87 # divergence case |
88 # we should pick as arbitrary one | 88 # we should pick as arbitrary one |
89 raise MultipleSuccessorsError(newer) | 89 raise MultipleSuccessorsError(newer) |
90 elif 1 < len(newer[0]): | 90 elif 1 < len(newer[0]): |
91 splitheads = list(repo.revs('heads(%ln::%ln)', newer[0], newer[0])) | 91 splitheads = list(repo.revs(b'heads(%ln::%ln)', newer[0], newer[0])) |
92 if 1 < len(splitheads): | 92 if 1 < len(splitheads): |
93 # split case, See if we can make sense of it. | 93 # split case, See if we can make sense of it. |
94 raise MultipleSuccessorsError(newer) | 94 raise MultipleSuccessorsError(newer) |
95 return splitheads[0] | 95 return splitheads[0] |
96 | 96 |