Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [cdv-devel] more merging stuff (bit long...): msg#00014

version-control.codeville.devel

Subject: Re: [cdv-devel] more merging stuff (bit long...)

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>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation