diff --git a/mercurial/util.py b/mercurial/util.py
index 7759c26a3a0bfe4ddd2d986ec7789b70dcbe8160_bWVyY3VyaWFsL3V0aWwucHk=..3c89227788a2f38ebd48f2438645757a2839b5ef_bWVyY3VyaWFsL3V0aWwucHk= 100644
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3867,7 +3867,6 @@
         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()
@@ -3872,6 +3871,6 @@
 
         value = docobject()
-        value.__doc__ = doc
+        value.__doc__ = pycompat.sysstr(doc)
         value._origdoc = engine.bundletype.__doc__
         value._origfunc = engine.bundletype