[PATCH] remote_branch with asyncore
Robert Collins
robertc at robertcollins.net
Mon Jun 27 21:56:45 BST 2005
On Mon, 2005-06-27 at 09:58 -0400, Aaron Bentley wrote:
def copy_multi_helper(self, other, to_copy, pb):
- from store import default_copy_multi
+ from store import default_copy_multi, ImmutableStore
+ if isinstance(other, ImmutableStore):
+ return self.copy_multi_helper_parallel(other, to_copy, pb)
return default_copy_multi(self, other, to_copy, pb)
Style wise, I think this is harmful : dispatching by type is usually a
sign that some behaviour or capability hasn't been recognized and put
into the objects interface.
In this case, I'm guessing what really matters is can
copy_multi_helper_parallel actually talk to the other store - not
whether it is mutable or not (and definately not whether its class is
ImmutableStore).
So I suggest putting some indication of that in the public Store
interface - so that if I were to write a Store that works from a CD-ROM,
it would be an ImmutableStore, but not confuse your code.
I also note there are no new tests - unit or otherwise - for this.. I
suspect that remote access is one area where tests are best put in
early ;).
Cheers,
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050628/730d2898/attachment.pgp
More information about the bazaar
mailing list