At http://people.ubuntu.com/~robertc/baz2.0/knits

------------------------------------------------------------
revno: 3789
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Robert Collins <[EMAIL PROTECTED]>
branch nick: knits
timestamp: Tue 2008-10-21 14:47:13 +1100
message:
  Ensure SHA1KnitCorrupt formats ok.
modified:
  bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
  bzrlib/tests/test_knit.py      test_knit.py-20051212171302-95d4c00dd5f11f2b
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py  2008-10-21 03:36:14 +0000
+++ b/bzrlib/errors.py  2008-10-21 03:47:13 +0000
@@ -1426,9 +1426,9 @@
 
 class SHA1KnitCorrupt(KnitCorrupt):
 
-    _fmy = ("Knit %(filename)s corrupt: sha-1 of reconstructed text does not "
+    _fmt = ("Knit %(filename)s corrupt: sha-1 of reconstructed text does not "
         "match expected sha-1. key %(key)s expected sha %(expected)s actual "
-        "sha %(actual)")
+        "sha %(actual)s")
 
     def __init__(self, filename, actual, expected, key, content):
         KnitError.__init__(self)

=== modified file 'bzrlib/tests/test_knit.py'
--- a/bzrlib/tests/test_knit.py 2008-10-21 03:36:14 +0000
+++ b/bzrlib/tests/test_knit.py 2008-10-21 03:47:13 +0000
@@ -943,6 +943,8 @@
         err = self.assertRaises(errors.KnitCorrupt,
             target.get_record_stream([broken], 'unordered', True).next)
         self.assertEqual(['gam\n', 'bar\n'], err.content)
+        # Test for formatting with live data
+        self.assertStartsWith(str(err), "Knit ")
 
 
 class TestKnitIndex(KnitTests):


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to