Patchwork [2,of,2] py3: build help of compression engines in bytes

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 13, 2018, 12:28 p.m.
Message ID <921feabe152110773b8b.1539433707@mimosa>
Download mbox | patch
Permalink /patch/35894/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 13, 2018, 12:28 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1539433045 -7200
#      Sat Oct 13 14:17:25 2018 +0200
# Node ID 921feabe152110773b8b85818b149a99166b9f74
# Parent  b8a16cf84c34d254df7ff276e49e6d5fd327eb8b
py3: build help of compression engines in bytes

Removes "b''" from help.
Augie Fackler - Oct. 13, 2018, 1:36 p.m.
> On Oct 13, 2018, at 14:28, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1539433045 -7200
> #      Sat Oct 13 14:17:25 2018 +0200
> # Node ID 921feabe152110773b8b85818b149a99166b9f74
> # Parent  b8a16cf84c34d254df7ff276e49e6d5fd327eb8b
> py3: build help of compression engines in bytes

queued, thanks

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3867,11 +3867,10 @@  def bundlecompressiontopics():
         if not bt or not bt[0]:
             continue
 
-        doc = pycompat.sysstr('``%s``\n    %s') % (
-            bt[0], engine.bundletype.__doc__)
+        doc = b'``%s``\n    %s' % (bt[0], pycompat.getdoc(engine.bundletype))
 
         value = docobject()
-        value.__doc__ = doc
+        value.__doc__ = pycompat.sysstr(doc)
         value._origdoc = engine.bundletype.__doc__
         value._origfunc = engine.bundletype