Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 16768:23a125545c3d stable
util: fix bad variable use in bytecount introduced by f0f7f3fab315
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 21 May 2012 14:24:24 -0500 |
parents | f0f7f3fab315 |
children | e406b9656da3 |
comparison
equal
deleted
inserted
replaced
16760:ac89a23ca814 | 16768:23a125545c3d |
---|---|
1184 '''return byte count formatted as readable string, with units''' | 1184 '''return byte count formatted as readable string, with units''' |
1185 | 1185 |
1186 for multiplier, divisor, format in _byteunits: | 1186 for multiplier, divisor, format in _byteunits: |
1187 if nbytes >= divisor * multiplier: | 1187 if nbytes >= divisor * multiplier: |
1188 return format % (nbytes / float(divisor)) | 1188 return format % (nbytes / float(divisor)) |
1189 return units[-1][2] % nbytes | 1189 return _byteunits[-1][2] % nbytes |
1190 | 1190 |
1191 def uirepr(s): | 1191 def uirepr(s): |
1192 # Avoid double backslash in Windows path repr() | 1192 # Avoid double backslash in Windows path repr() |
1193 return repr(s).replace('\\\\', '\\') | 1193 return repr(s).replace('\\\\', '\\') |
1194 | 1194 |