Rev 6035: (jameinel) Add _LazyListJoin.__repr__ for easier debugging. (John A Meinel) in file:///home/pqm/archives/thelove/bzr/2.4/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 18 17:45:01 UTC 2011


At file:///home/pqm/archives/thelove/bzr/2.4/

------------------------------------------------------------
revno: 6035 [merge]
revision-id: pqm at pqm.ubuntu.com-20110818174456-bfxvop3tb9f1b5dn
parent: pqm at pqm.ubuntu.com-20110815113100-9kg4d1t11th0myu5
parent: john at arbash-meinel.com-20110818132718-b4rrujubsaa3evuz
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.4
timestamp: Thu 2011-08-18 17:44:56 +0000
message:
  (jameinel) Add _LazyListJoin.__repr__ for easier debugging. (John A Meinel)
modified:
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
  bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2011-06-30 11:14:06 +0000
+++ b/bzrlib/repository.py	2011-08-18 13:27:18 +0000
@@ -1901,3 +1901,7 @@
         for list_part in self.list_parts:
             full_list.extend(list_part)
         return iter(full_list)
+
+    def __repr__(self):
+        return "%s.%s(%s)" % (self.__module__, self.__class__.__name__,
+                              self.list_parts)

=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py	2011-05-26 08:05:45 +0000
+++ b/bzrlib/tests/test_repository.py	2011-08-18 13:27:18 +0000
@@ -1660,3 +1660,11 @@
     def test_IDS_format_same_no(self):
         # When the formats are the same, pack is not called.
         self.run_fetch('2a', '2a', False)
+
+
+class Test_LazyListJoin(tests.TestCase):
+
+    def test__repr__(self):
+        lazy = repository._LazyListJoin(['a'], ['b'])
+        self.assertEqual("bzrlib.repository._LazyListJoin((['a'], ['b']))",
+                         repr(lazy))




More information about the bazaar-commits mailing list