Skip to content
Snippets Groups Projects
Commit 0e200e1801f4 authored by Martin Geisler's avatar Martin Geisler
Browse files

relink: format reclaimed byte count nicely

parent c0a700f400d8
No related branches found
No related tags found
No related merge requests found
......@@ -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': (
......
......@@ -25,7 +25,7 @@
$ 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
......@@ -30,5 +30,12 @@
$ 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 ..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment