Rev 21: .transport_stats_for_bzr file is 1/10 of its equivalent textual representation. in file:///v/home/vila/.bazaar/plugins/transportstats/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Oct 9 09:00:55 BST 2007
At file:///v/home/vila/.bazaar/plugins/transportstats/
------------------------------------------------------------
revno: 21
revision-id: v.ladeuil+lp at free.fr-20071009080054-6jrm7ti5wzwbxgw7
parent: v.ladeuil+lp at free.fr-20071009071109-mlxeus44re2b2bo0
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: transportstats
timestamp: Tue 2007-10-09 10:00:54 +0200
message:
.transport_stats_for_bzr file is 1/10 of its equivalent textual representation.
* stats.py:
(Stats.__iter_raw): Quick-and-dirty hack to get raw stat content.
modified:
stats.py stats.py-20070928061304-7i3r2h4gg6rbi03e-1
-------------- next part --------------
=== modified file 'stats.py'
--- a/stats.py 2007-10-09 07:11:09 +0000
+++ b/stats.py 2007-10-09 08:00:54 +0000
@@ -234,6 +234,20 @@
body = self._sfile.read_stat_body(body_file, stat_format)
yield stat_class(name, stat_format, *body)
+ # FIXME: This method is a quick-and-dirty hack, it may disappear.
+ def __iter_raw(self):
+ for stat in self._sfile:
+ # FIXME: layer violation between Stats/StatsFile
+ name, body_file = self._sfile.read_stat_name(
+ stat, self._name_serializer)
+ try:
+ (stat_class, stat_format) = stats_registry.get(name)
+ except:
+ trace.warning('Unknown method in stats file: %s' % name)
+ else:
+ body = self._sfile.read_stat_body(body_file, stat_format)
+ yield name, body
+
_stats = None
More information about the bazaar-commits
mailing list