[MERGE] Move branch stats gathering into Repository.gather_stats
Martin Pool
mbp at canonical.com
Mon Feb 5 04:13:46 GMT 2007
On 3 Feb 2007, Robert Collins <robertc at robertcollins.net> wrote:
> This is a new Repository method 'gather_stats' for statistic data
> collection. This is expected to grow to cover a number of related uses
> mainly related to bzr info.
Thanks, that's a useful cleanup.
> === modified file bzrlib/repository.py
> --- bzrlib/repository.py
> +++ bzrlib/repository.py
> @@ -243,6 +243,45 @@
> return self.control_files.get_physical_lock_status()
>
> @needs_read_lock
> + def gather_stats(self, revid, committers=None):
> + """Gather statistics from a revision id.
> +
> + :param revid: The revision id to gather statistics from.
> + :param committers: Optional parameter controlling whether to grab
> + a count of committers.
I think it'd be clearer as count_committers and committer_count
respectively.
Looking at this I see it still gives the size of the revision data, but
not the other sizes. Not traversing the whole thing (at least by default)
is good but the result might be misleading.
--
Martin
More information about the bazaar
mailing list