Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 31946:f3b80537a70d
util: fix human-readable printing of negative byte counts
Apply the same human-readable printing rules to negative byte counts as to
positive ones. Fixes output of debugupgraderepo.
author | G?bor Stefanik <gabor.stefanik@nng.com> |
---|---|
date | Mon, 10 Apr 2017 18:16:30 +0200 |
parents | 12aca6770046 |
children | cc70c6dbac30 |
line wrap: on
line diff
--- a/mercurial/util.py Thu Apr 13 03:17:53 2017 -0700 +++ b/mercurial/util.py Mon Apr 10 18:16:30 2017 +0200 @@ -2161,7 +2161,7 @@ def go(count): for multiplier, divisor, format in unittable: - if count >= divisor * multiplier: + if abs(count) >= divisor * multiplier: return format % (count / float(divisor)) return unittable[-1][2] % count