[RFC] weave refactoring

Johan Rydberg jrydberg at gnu.org
Sun Dec 11 02:45:30 GMT 2005


Hi,

In my efforts to implement the knit history format I've begun a
refactoring work of things in bzrlib that operates on versioned files;
i.e., weaves.  I've created an abstract class called VersionedFile,
and a store type to come with it; VersionedFileStore.

I renamed control_weaves to control_store, and weave_store to
file_store. revision_store is left untouched at this moment.

To test the concept I implemented WeaveVersionedFile, and changed
WeaveStore to implement the VersionedFileStore API.  It took some
effort, but _almost_* all tests pass.  There is also some code that is
hard to adopt to the new API; the weave merge being one.  Right now it
knows about the internals of WeaveVersionedFile.

The code can be found at:

  http://repo.panadafs.org/bzr/bzr.jrydberg.versionedfile/

(It is also possible to rsync it; repo.panadafs.org::bzr/...)

Next I will look at the Transaction API and how to modify it to fit my
purposes.  The initial plan is to let callers register "transactions"
inside the transaction.  Each transaction will be associated with a
transaction id.  During commit or rollback, methods on the registered
object will be invoked with the transaction id in the order the
transactions was registered.  API wise this means adding a extra
parameter to register_dirty.   Robert, I would love your input on
this.

The transport API also has to be altered to support append-only
formats such as knits.  This has been discussed earlier on the list.


The overall goal of this work is to let BzrBranch support both weave
and knits, in parallel.  Jelmer has also expression interest for the
work, since it would make foreign branches easier to implement.

~j

 * I disabled test_upgrade, since upgrade.py is too weave-oriented
   right now. 





More information about the bazaar mailing list