[MERGE] BranchBuilder updates

John Arbash Meinel john at arbash-meinel.com
Tue Jul 22 20:34:33 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For my merge work, I was realizing that I'm going to need to be creating
a lot of different histories, including weird branching and merging, and
per-file changes.

I was hoping to do it with in-memory trees, but our current APIs are a
bit lacking.

So with this, I'm adding new functionality to BranchBuilder, which will
let us build lots of nice history without actually having to hit disk.

I'd like to get some tests switched over to using it, just to show how
it works. But the basic idea is that you describe the changes as a list
of 'actions' for each commit.

The one thing it doesn't support is "merge" because our merge code
depends on having a real disk backing the WorkingTree. It also doesn't
support "rename" yet, because MemoryTree doesn't.

At the moment, I'm calling the nice function "build_snapshot".
"build_commit" was already taken (to create a simple linear commit
without anything very interesting). I certainly could just replace the
"build_commit" function if we prefer. It isn't a public-for-plugins sort
of thing, it has been meant for testing, where we have been less strict
about compatibility.

Feedback is very welcome, as I plan on using this "in anger" soon.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiGNkkACgkQJdeBCYSNAAOBOwCgoDV9xjf8irFi3IdrxJJ1eF75
Ko0AnjAhPumZjMfZWExa7dVpEQpXPgQB
=npWv
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: branch_builder.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080722/f4b0e584/attachment-0001.diff 


More information about the bazaar mailing list