comparison mercurial/util.py @ 31811:d955b02d8ec6

util: fix %-formatting on docstring by moving a closing parenthesis We have to do the % formatting over the sysstr, since the things we're going to splat into it are themselves sysstrs. This is probably technically wrong-ish, since bt is probably actually a bytestr here, but this fixes the immediate issue, which was that hg was broken on Python 3.
author Augie Fackler <augie@google.com>
date Mon, 03 Apr 2017 19:03:34 -0400
parents 55c0c91f55e6
children 9ff5a124d111
comparison
equal deleted inserted replaced
31810:81abd0d12c86 31811:d955b02d8ec6
3703 3703
3704 bt = engine.bundletype() 3704 bt = engine.bundletype()
3705 if not bt or not bt[0]: 3705 if not bt or not bt[0]:
3706 continue 3706 continue
3707 3707
3708 doc = pycompat.sysstr('``%s``\n %s' % ( 3708 doc = pycompat.sysstr('``%s``\n %s') % (
3709 bt[0], engine.bundletype.__doc__)) 3709 bt[0], engine.bundletype.__doc__)
3710 3710
3711 value = docobject() 3711 value = docobject()
3712 value.__doc__ = doc 3712 value.__doc__ = doc
3713 3713
3714 items[bt[0]] = value 3714 items[bt[0]] = value