Mercurial > evolve
changeset 5046:ebd0f5c6098f
pullbundle: use % instead of .format() because % exists for bytes
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 20 Dec 2019 13:50:31 +0700 |
parents | c9b25b1d6a61 |
children | a8ac174010a5 |
files | hgext3rd/pullbundle.py |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/pullbundle.py Thu Dec 19 18:16:18 2019 +0700 +++ b/hgext3rd/pullbundle.py Fri Dec 20 13:50:31 2019 +0700 @@ -611,19 +611,20 @@ b'max': data[-1], } -STATSFORMAT = b"""{name}: - min: {min} - 10%: {10%} - 25%: {25%} - 50%: {50%} - 75%: {75%} - 90%: {90%} - 95%: {95%} - max: {max} +STATSFORMAT = b"""%(name)s: + min: %(min)r + 10%%: %(10%)r + 25%%: %(25%)r + 50%%: %(50%)r + 75%%: %(75%)r + 90%%: %(90%)r + 95%%: %(95%)r + max: %(max)r """ def fmtdist(name, data): - return STATSFORMAT.format(name=name, **data) + data[b'name'] = name + return STATSFORMAT % data # hg <= 4.6 (bec1212eceaa) if util.safehasattr(uimod.ui, 'makeprogress'):