[MERGE] Add ErrorFromSmartServer exception, and raise it from read_response_tuple for all protocol versions (protocol v3 patch 5/7)

Andrew Bennetts andrew at canonical.com
Thu Apr 24 00:19:23 BST 2008


This is the fifth in a series of patches that implement version 3 of the smart
server protocol.  The full branch with all changes combined is at
<http://people.ubuntu.com/~andrew/bzr/protocol-v3-loom/>

errors.py
---------

Adds ErrorFromSmartServer.  This is used to consistently cause an exception to
be raised in the client when the server returns an error response.  It turned
out that this isn't really a core change for v3, but I feel it's a step in the
right direction for more consistent error handling.

remote.py
---------

Catch ErrorFromSmartServer rather than detecting errors by hand.  (We still have
to translate ErrorFromSmartServer to more specific errors manually in
remote.py.)

transport/remote.py
-------------------

Catch ErrorFromSmartServer here too.

test_remote.py
--------------

Revamp the FakeClient test double to have a richer API.  Aside from being more
readable, this is needed for the ErrorFromSmartServer abstraction.


-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-ErrorFromSmartServer.patch
Type: text/x-diff
Size: 45973 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080424/decb855d/attachment-0002.bin 


More information about the bazaar mailing list