[MERGE] Default InterRepository.fetch raises IncompatibleRepositories

Martin Pool mbp at sourcefrog.net
Mon Jul 28 11:01:03 BST 2008


https://bugs.edge.launchpad.net/bzr/+bug/206258 
  incompatible repository error messages are unhelpful  [edit]  

This raises a better error when failing to fetch from one repository to the
other, tests it, and adds the start of some documentation about InterObject.

A couple of general points:

I think we should reserve NotImplementedError for cases where we intend to
write the code and it's not done - comparable to an AssertionError.  It is
potentially confusing to also use it for expected conditions.

Also, when we're doing a 'check' type operation I think it may be better to
have the core code raise an exception if the condition is not true, and then
possibly there can be a convenience method to turn it into a boolean.  If the
api is defined as just a boolean it's hard to pass back extra information.
(There are tradeoffs; this is just a thought not a hard-and-fast rule.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 9441 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080728/76f0dec7/attachment.bin 


More information about the bazaar mailing list