tags: fix some type confusion exposed in python 3
# skip-blame just b-prefix and %-format cleanup, no meaningful change
Differential Revision: https://phab.mercurial-scm.org/D8107
#require docutils gettext $ $TESTDIR/check-gendoc fr checking for parse errors