Interesting merge optimization
John Arbash Meinel
john at arbash-meinel.com
Sat Dec 3 05:37:18 GMT 2005
First, a caveat: this is not meant for the weak at heart, and you could
pretty easily mess up your local branch.
I was just going back to an old branch of mine (cdv-diff), and I wanted
to merge in my latest integration. It started to say that it had to
merge 375 revisions, which I new would be really painful.
So instead, I switched to the integration branch, merged against the
diff branch.
Then I switched the revision history, and the pending-merges entry.
This meant that it only had to merge 11 revisions, which was much less
painful. (at this point you probably also want to change the
.bzr/parent, and if you use my plugin .bzr/x-rsync-data)
I was thinking that the merge code might be smarter when it needs to
merge 2 weave files.
It could use the table of contents, and do a set intersection to see
which of the two weaves present was more complete. Then it would start
with that, and only pull in the new entries. This might help prevent a
worst case behavior.
I know knits should help this a lot, by allowing the text to be pulled
across, only interpreting it to update the revision identifiers; not
having to extract a text and diff against it.
Speaking of knits, I was thinking that we might be trying for too much
by setting the requirement that we don't have to load the whole thing
into memory. I realize we would like to see a version which gets around
the O(n_lines) behavior by not having to load all lines.
However, I know if we wanted to use CDVWeave, we need to have the
complete set of text lines present. (We don't need the complete set of
annotations). That's how cdv handles convergence and resurrection,
because it can diff against deleted lines.
Anyway, I was just thinking that it would be easier to create a knit
format which allowed faster pull/merge operations, but didn't have to
fit all of the requirements. (right now I'm noticing more and more how
slow pull/merge is and I do everything locally, using cron jobs to pull
the files from remote).
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051202/d6f5c3f1/attachment.pgp
More information about the bazaar
mailing list