Commit 7dfb53a4 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

pullbundle: use % instead of .format() because % exists for bytes

parent c9b25b1d6a61
...@@ -611,19 +611,20 @@ def distribution(data): ...@@ -611,19 +611,20 @@ def distribution(data):
b'max': data[-1], b'max': data[-1],
} }
STATSFORMAT = b"""{name}: STATSFORMAT = b"""%(name)s:
min: {min} min: %(min)r
10%: {10%} 10%%: %(10%)r
25%: {25%} 25%%: %(25%)r
50%: {50%} 50%%: %(50%)r
75%: {75%} 75%%: %(75%)r
90%: {90%} 90%%: %(90%)r
95%: {95%} 95%%: %(95%)r
max: {max} max: %(max)r
""" """
def fmtdist(name, data): def fmtdist(name, data):
return STATSFORMAT.format(name=name, **data) data[b'name'] = name
return STATSFORMAT % data
# hg <= 4.6 (bec1212eceaa) # hg <= 4.6 (bec1212eceaa)
if util.safehasattr(uimod.ui, 'makeprogress'): if util.safehasattr(uimod.ui, 'makeprogress'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment