Rev 5664: (gz) Store context argument to RetryWithNewPacks which stops stringification in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/2.3/
Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Nov 10 17:13:54 UTC 2011
At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/2.3/
------------------------------------------------------------
revno: 5664 [merge]
revision-id: pqm at pqm.ubuntu.com-20111110171354-z6nw3oudd4e7p863
parent: pqm at cupuasso-20110909131019-ag68vp8ggu0k7ut3
parent: martin.packman at canonical.com-20111110104654-08kyptbm1k7kmvwg
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.3
timestamp: Thu 2011-11-10 17:13:54 +0000
message:
(gz) Store context argument to RetryWithNewPacks which stops stringification
breaking (Martin Packman)
modified:
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/tests/test_errors.py test_errors.py-20060210110251-41aba2deddf936a8
doc/en/release-notes/bzr-2.3.txt NEWS-20050323055033-4e00b5db738777ff
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py 2011-07-27 11:57:32 +0000
+++ b/bzrlib/errors.py 2011-11-10 10:46:54 +0000
@@ -1563,6 +1563,7 @@
problem we can raise the original error (value from sys.exc_info())
"""
BzrError.__init__(self)
+ self.context = context
self.reload_occurred = reload_occurred
self.exc_info = exc_info
self.orig_error = exc_info[1]
=== modified file 'bzrlib/tests/test_errors.py'
--- a/bzrlib/tests/test_errors.py 2011-01-12 01:01:53 +0000
+++ b/bzrlib/tests/test_errors.py 2011-03-14 06:06:28 +0000
@@ -712,6 +712,14 @@
'Please use `bzr unbind` to fix.')
self.assertEqualDiff(msg, str(error))
+ def test_retry_with_new_packs(self):
+ fake_exc_info = ('{exc type}', '{exc value}', '{exc traceback}')
+ error = errors.RetryWithNewPacks(
+ '{context}', reload_occurred=False, exc_info=fake_exc_info)
+ self.assertEqual(
+ 'Pack files have changed, reload and retry. context: '
+ '{context} {exc value}', str(error))
+
class PassThroughError(errors.BzrError):
=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- a/doc/en/release-notes/bzr-2.3.txt 2011-09-09 12:32:08 +0000
+++ b/doc/en/release-notes/bzr-2.3.txt 2011-11-10 10:46:54 +0000
@@ -35,6 +35,9 @@
* Cope cleanly with buggy HTTP proxies that close the socket in the middle
of a multipart response. (Martin Pool, #198646).
+* Fix "Unprintable exception" error when a RetryWithNewPacks error is
+ displayed. (Andrew Bennetts)
+
Documentation
*************
More information about the bazaar-commits
mailing list