D4608: py3: use codecs.encode() to encode in rot-13 encoding
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Sep 16 15:53:46 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The other occurence will need some more love as description is bytes by default
and we need to decode it and then encode it.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4608
AFFECTED FILES
tests/test-log-exthook.t
CHANGE DETAILS
diff --git a/tests/test-log-exthook.t b/tests/test-log-exthook.t
--- a/tests/test-log-exthook.t
+++ b/tests/test-log-exthook.t
@@ -3,13 +3,14 @@
$ cat > $TESTTMP/logexthook.py <<EOF
> from __future__ import absolute_import
+ > import codecs
> from mercurial import (
> commands,
> logcmdutil,
> repair,
> )
> def rot13description(self, ctx):
- > summary = "summary".encode('rot13')
+ > summary = codecs.encode("summary", 'rot-13')
> description = ctx.description().strip().splitlines()[0].encode('rot13')
> self.ui.write("%s: %s\n" % (summary, description))
> def reposetup(ui, repo):
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list