--- a/hgext/relink.py Wed Mar 16 13:25:12 2011 +0100
+++ b/hgext/relink.py Wed Mar 16 13:51:47 2011 +0100
@@ -168,8 +168,8 @@
ui.progress(_('relinking'), None)
- ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
- (relinked, savedbytes))
+ ui.status(_('relinked %d files (%s reclaimed)\n') %
+ (relinked, util.bytecount(savedbytes)))
cmdtable = {
'relink': (
--- a/tests/test-relink.t Wed Mar 16 13:25:12 2011 +0100
+++ b/tests/test-relink.t Wed Mar 16 13:51:47 2011 +0100
@@ -25,10 +25,17 @@
$ hg ci -Am addfile
adding a
adding b
- $ echo a >> a
- $ echo a >> b
+ $ cat $TESTDIR/binfile.bin >> a
+ $ cat $TESTDIR/binfile.bin >> b
$ hg ci -Am changefiles
+make another commit to create files larger than 1 KB to test
+formatting of final byte count
+
+ $ cat $TESTDIR/binfile.bin >> a
+ $ cat $TESTDIR/binfile.bin >> b
+ $ hg ci -m anotherchange
+
Test files are read in binary mode
$ python -c "file('.hg/store/data/dummy.i', 'wb').write('a\r\nb\n')"
@@ -71,7 +78,7 @@
pruned down to 2 probably relinkable files
relinking: data/a.i 1/2 files (50.00%)
not linkable: data/dummy.i
- relinked 1 files (136 bytes reclaimed)
+ relinked 1 files (1.37 KB reclaimed)
$ cd ..