Rev 5: More horizontal space needed. in http://people.ubuntu.com/~robertc/baz2.0/plugins/repodetails/trunk

Robert Collins robertc at robertcollins.net
Wed Oct 22 06:07:18 BST 2008


At http://people.ubuntu.com/~robertc/baz2.0/plugins/repodetails/trunk

------------------------------------------------------------
revno: 5
revision-id: robertc at robertcollins.net-20081022050716-warqin5lnnzah30u
parent: robertc at robertcollins.net-20081017045112-a2aqrvtf9hlfh4lh
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2008-10-22 16:07:16 +1100
message:
  More horizontal space needed.
modified:
  __init__.py                    __init__.py-20081017014933-iriuw53viune2txe-2
  tests/test_repositorydetails.py test_repositorydetai-20081017014933-iriuw53viune2txe-6
=== modified file '__init__.py'
--- a/__init__.py	2008-10-17 04:51:12 +0000
+++ b/__init__.py	2008-10-22 05:07:16 +0000
@@ -208,7 +208,7 @@
         # Mangle the percentages for very small repos to avoid divide by zero.
         raw_percent = (objectstats.raw_size + 1)*100/(total.raw_size + 1)
         compressed_percent = (objectstats.compressed_size + 1)*100/(total.compressed_size + 1)
-        return "%7d KiB %3d%%  %7d KiB %3d%%  %7d" % (objectstats.raw_size/1024,
+        return "%8d KiB %3d%%  %8d KiB %3d%%  %7d" % (objectstats.raw_size/1024,
             raw_percent, objectstats.compressed_size/1024, compressed_percent,
             objectstats.objects)
 
@@ -216,7 +216,7 @@
         repo = repository.Repository.open(path)
         stats = gather_stats(repo)
         self.outf.write("Commits: %d\n" % stats.revision_count)
-        self.outf.write("                     Raw    %   Compressed    %  Objects\n")
+        self.outf.write("                      Raw    %    Compressed    %  Objects\n")
         self.outf.write("Revisions:   %s\n" %
             self._format_object(stats.revisions, stats.total))
         self.outf.write("Inventories: %s\n" %

=== modified file 'tests/test_repositorydetails.py'
--- a/tests/test_repositorydetails.py	2008-10-17 04:51:12 +0000
+++ b/tests/test_repositorydetails.py	2008-10-22 05:07:16 +0000
@@ -32,12 +32,12 @@
         out, err = self.run_bzr(["repository-details"])
         self.assertEqual(
             "Commits: 1\n"
-            "                     Raw    %   Compressed    %  Objects\n"
-            "Revisions:         0 KiB  53%        0 KiB  45%        1\n"
-            "Inventories:       0 KiB  44%        0 KiB  35%        1\n"
-            "Texts:             0 KiB   2%        0 KiB  19%        1\n"
-            "Signatures:        0 KiB   0%        0 KiB   0%        0\n"
-            "Total:             0 KiB 100%        0 KiB 100%        3\n"
+            "                      Raw    %    Compressed    %  Objects\n"
+            "Revisions:          0 KiB  53%         0 KiB  45%        1\n"
+            "Inventories:        0 KiB  44%         0 KiB  35%        1\n"
+            "Texts:              0 KiB   2%         0 KiB  19%        1\n"
+            "Signatures:         0 KiB   0%         0 KiB   0%        0\n"
+            "Total:              0 KiB 100%         0 KiB 100%        3\n"
             , out)
         self.assertEqual("", err)
 




More information about the bazaar-commits mailing list