[Pkg-bazaar-commits] ./bzr/unstable r223: doc
mbp at sourcefrog.net
mbp at sourcefrog.net
Fri Apr 10 07:51:28 UTC 2009
------------------------------------------------------------
revno: 223
committer: mbp at sourcefrog.net
timestamp: Sat 2005-04-09 15:51:22 +1000
message:
doc
modified:
bzrlib/revfile.py
-------------- next part --------------
=== modified file 'bzrlib/revfile.py'
--- a/bzrlib/revfile.py 2005-04-09 05:50:22 +0000
+++ b/bzrlib/revfile.py 2005-04-09 05:51:22 +0000
@@ -389,7 +389,15 @@
f.write("%8x %8d %8d\n" % (rec[2], rec[3], rec[4]))
+
def total_text_size(self):
+ """Return the sum of sizes of all file texts.
+
+ This is how much space they would occupy if they were stored without
+ delta and gzip compression.
+
+ As a side effect this completely validates the Revfile, checking that all
+ texts can be reproduced with the correct SHA-1."""
t = 0L
for idx in range(len(self)):
t += len(self.get(idx))
More information about the Pkg-bazaar-commits
mailing list