[RFC] readonly branch and repository tests

Robert Collins robertc at robertcollins.net
Fri Jun 22 03:35:28 BST 2007

We have several scenarios where we want to make sure bzr can do readonly
operations on branches and repositories, but not read-write ones.

 - Bundle 5 is likely to be a branch-as-a-bundle (or at least I think
its well worth trying for) - this is a readonly repository and branch
implementation, so mutating tests are pointless.
 - bzr-hg, bzr-git, bzr-cvs if it is created - none of these should be
required to write to the backend losslessly, and being able to just
'pull' with confidence would be a great win. And we cannot represent in
these other systems all the things that we do - forcing a real-time
export (which is what write support to a foreign format is) - as the
price to be able to test these things is basically ugly.

So I'm thinking about how to structure our per-implementation tests to
cater for this.

I'm thinking that there are three basic steps:
 - tag readonly implementations somehow - starting with Branch4
 - split out the tests of mutating interfaces somehow.
  * Possibly decorate them
  * possibly split the directories to keep our simple approach
  * possibly a different list in the per-FOO/__init__.py.
 - change the readonly tests to call a method on self after setting up
the scenario, which will transform the branch/repository into the real
format needed, and then the test can proceed. I see this working much
like the InterTree adaption function works - which has been quite
successful I thought in letting us test things that interact with

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/20070622/5d3306e9/attachment.pgp 

More information about the bazaar mailing list