Rev 5752: (jelmer) Allow extra data to be returned by Repository.gather_stats(). in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sat Apr 2 23:11:05 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5752 [merge]
revision-id: pqm at pqm.ubuntu.com-20110402231100-l6p99hxfe6722vir
parent: pqm at pqm.ubuntu.com-20110402005952-kxcwbwdk6jagtfwm
parent: jelmer at samba.org-20110402214342-6if5kr5nabnwcysy
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2011-04-02 23:11:00 +0000
message:
(jelmer) Allow extra data to be returned by Repository.gather_stats().
(Jelmer Vernooij)
modified:
bzrlib/tests/per_repository/test_statistics.py test_statistics.py-20070203082432-6738e8fl0mm7ikre-1
=== modified file 'bzrlib/tests/per_repository/test_statistics.py'
--- a/bzrlib/tests/per_repository/test_statistics.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/per_repository/test_statistics.py 2011-04-02 21:43:42 +0000
@@ -45,20 +45,17 @@
},
stats)
stats = tree.branch.repository.gather_stats(rev2, committers=True)
- self.assertEqual({
- 'committers': 2,
- 'firstrev': (1170491381.0, 0),
- 'latestrev': (1171491381.0, 0),
- 'revisions': 3,
- },
- stats)
+ self.assertEquals(2, stats["committers"])
+ self.assertEquals((1170491381.0, 0), stats["firstrev"])
+ self.assertEquals((1171491381.0, 0), stats["latestrev"])
+ self.assertEquals(3, stats["revisions"])
def test_gather_stats_empty_repo(self):
"""An empty repository still has revisions."""
tree = self.make_branch_and_memory_tree('.')
# now ask for global repository stats.
stats = tree.branch.repository.gather_stats()
- self.assertEqual({
- 'revisions': 0
- },
- stats)
+ self.assertEquals(0, stats['revisions'])
+ self.assertFalse("committers" in stats)
+ self.assertFalse("firstrev" in stats)
+ self.assertFalse("latestrev" in stats)
More information about the bazaar-commits
mailing list