[MERGE/RFC] MultiWalker

John Arbash Meinel john at arbash-meinel.com
Fri Jul 18 21:04:47 BST 2008


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

Now with patch attached.

John Arbash Meinel wrote:
| To make progress towards updating merge to handle criss-cross a bit
| better, I've written a helper class.
|
| The basic idea is that I'm going to be switching from 3-way merge logic
| for inventory information, into more of an LCA-style logic.
|
| The first step in that, is to determine what is new in THIS versus *all*
| the LCAs. And I was planning on doing that by using last-modified info
| as a first culling pass, and then look closer (either using LCA logic,
| or using per-file graphs and loading the different inventories.)
|
| Anyway, this code drop is intended to bring in a class that can walk
| multiple trees at the same time, and yield the matching inventory
| entries against all trees.
|
| It is technically a 'merge_sort' across the iter_entries_by_dir on each
| tree. Though I cheat a little bit, by knowing that I can do direct
| lookups, in case something was renamed on one side.
|
| I also use a single "master" entry, and then fill in the rest later. So
| it isn't a pure "merge sort". It might be better to do that, but this
| was easier for me to code.
|
| It isn't in active use yet, but it is something that can be reviewed
| separately.
|
| And one bit that isn't as thoroughly tested as I would like. The paths
| need to be compared in "dirblock" sorted order (otherwise you would end
| up with iterators out of sync). I just had difficulty writing up a
| correct patch that would fail if you didn't use the right ordering.
|
| John
| =:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiA918ACgkQJdeBCYSNAAPTjACgt2jry5matXIM5IJkQJonVj0K
s2wAoIxpNgOKGWGuHefRMlCZb6O67Io9
=SzeF
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multi_walker.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080718/8790895a/attachment-0001.diff 


More information about the bazaar mailing list