Mercurial > hg-stable
changeset 40506:005bc856e919
py3: port test-log-exthook.t to Python 3
For once an easy one.
Differential Revision: https://phab.mercurial-scm.org/D5184
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 23 Oct 2018 11:31:33 -0400 |
parents | 09a37a5d8f5d |
children | d69cf134bd50 |
files | contrib/python3-whitelist tests/test-log-exthook.t |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/python3-whitelist Fri Oct 12 12:30:47 2018 -0400 +++ b/contrib/python3-whitelist Tue Oct 23 11:31:33 2018 -0400 @@ -309,6 +309,7 @@ test-linerange.py test-locate.t test-lock-badness.t +test-log-exthook.t test-log-linerange.t test-log.t test-logexchange.t
--- a/tests/test-log-exthook.t Fri Oct 12 12:30:47 2018 -0400 +++ b/tests/test-log-exthook.t Tue Oct 23 11:31:33 2018 -0400 @@ -9,10 +9,12 @@ > logcmdutil, > repair, > ) + > def brot13(b): + > return codecs.encode(b.decode('utf8'), 'rot-13').encode('utf8') > def rot13description(self, ctx): - > summary = codecs.encode("summary", 'rot-13') - > description = ctx.description().strip().splitlines()[0].encode('rot13') - > self.ui.write("%s: %s\n" % (summary, description)) + > description = ctx.description().strip().splitlines()[0] + > self.ui.write(b"%s: %s\n" % (brot13(b"summary"), + > brot13(description))) > def reposetup(ui, repo): > logcmdutil.changesetprinter._exthook = rot13description > EOF