Hi,

a file with size 264901826 bytes (don’t ask!!) causes “svn list -vH 
URL-OF-FILE-IN-REPO” (using Subversion 1.14) to abort with

svn: subversion/svn/filesize.c:93: format_size: Assertion 
`absolute_human_readable_size < 1000.0' failed.

on GNU/Linux. As it turns out, get_base2_unit_file_size() in 
subversion/svn/filesize.c produces nonsense. Nonsense as in “humbug for files 
larger than 1 MB”. My guess would be that this is what the author was aiming 
for: (assuming the result is supposed to have roughly two decimals)

Index: filesize.c
===================================================================
--- filesize.c (revision 1878396)
+++ filesize.c (working copy)
@@ -139,7 +139,7 @@
++index;
}
human_readable_size = (index == 0 ? (double)size
- : (size >> 3 * index) / 128.0 / index);
+ : (double)(size >> (10 * index - 7)) / 128.0);

return format_size(human_readable_size,
long_units, order, index, result_pool);

Kind Regards,
Tobias


Reply via email to