|
|
Choosing A Webhost: |
Re: [cdv-devel] more merging stuff (bit long...): msg#00014version-control.codeville.devel
Bram Cohen wrote: > The new codeville merge code I linked to recently contains code for doing > implicit undo on a single binary value (whether a line is included or > not). I *think* that approach can be generalized to scalar values by > running it over a tree multiple times for each value which has ever > occured, with the two values set to a/not a, b/not b, etc. If there's only > one value which should be present, it's set to that value, if there are > multiple ones, you have a conflict. I *think* it's impossible to have no > values set, but that's an open conjecture. Here's an example. Let's take one problematic case: a / \ d b \ / \ b c Now we have to run over this in four cases: a/not a, b/not b, c/not c, and d/not d. I'll use # to indicate 'not'. Here are the four cases: a / \ # # \ / \ # # Clearly a loses. # / \ # b \ / \ b # In this case the lower b was a clean merge, because the upper # had already gotten overridden by the upper b. Therefore the lower b loses to the override effect of the lower right #, so the overall result is # and b loses. # / \ # # \ / \ # c Obviously c wins. # / \ d # \ / \ # # And clearly d loses. Hopefully that clarifies the notion of doing a multi-valued merge as a set of binary merges. By the way, the merge code is at http://bitconjurer.org/merge.py and the part which does two-valued merges is LivingStatus. Probably the easiest way to understand my proposal is to simply read the code for it. (You can ignore the rest of that file other than LivingStatus for now.) The neat trick with merging binary values is that you can never have a conflict - if one side changes then it wins, if both side changes you have a coincidental merge, but there's no such concept as having parallel changes to two different values. -Bram
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [cdv-devel] more merging stuff (bit long...), Bram Cohen |
|---|---|
| Next by Date: | Re: [cdv-devel] more merging stuff (bit long...), Kevin Smith |
| Previous by Thread: | Re: [cdv-devel] more merging stuff (bit long...), Bram Cohen |
| Next by Thread: | Re: [cdv-devel] more merging stuff (bit long...), Kevin Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |