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: The new Codeville merge algorithm: msg#00005

version-control.revctrl

Subject: Re: The new Codeville merge algorithm

Nathaniel Smith wrote:

> Some useful context for this may be two recent messages on
> monotone-devel, where I lay out the known flaws in 3-way merge, and
> why I no longer believe it is an acceptable approach to merging in any
> but very restricted cases:
> http://article.gmane.org/gmane.comp.version-control.monotone.devel/3256
> http://article.gmane.org/gmane.comp.version-control.monotone.devel/3264
> Full thread:
> http://thread.gmane.org/gmane.comp.version-control.monotone.devel/3240

A somewhat tangential point has to do with how files are identified.
Codeville simply has file and directory identifiers, and there's a (name,
parent) property of files which gets versioned with a single 'last
modified' stamp. Not having these seems to be aggravating your three way
merge problems.

A note about the whole rename thing - that information is still going to
be tracked with an old-school last modified stamp in the new Codeville
merge algorithm, but the behavior of that stamp may change a bit. The
problem comes when you have a coincidental match. This is a conflict as
far as history is concerned, but can't be escalated to the user, because
they can only fix it one way. The obvious way to fix this is to just pick
one. (That's how coincidental matches in code are handled - that will
probably get special cased). While reasonable, that approach would
sometimes give incorrect conflicts in this case -

P
|\
| \
A A
| /|
|/ |
A P
\ |
\|
?

What we're doing instead (and this may be a very small win, coincidental
matches on renames are a rare case) is that there's a list of ancestors in
the last modified, and if there's a coincidental match they get glommed
together. Another version is considered to beat the list if it contains
*anything* from within the list. This can cause an ambiguous clean merge
in the following case:

P
/\
/ \
/ \
A B
|\ /|
| | | |
B \/ A
| /\ |
| | | |
|/ \|
B A
\ /
\ /
\/
?

In this case we present this as an ambiguous clean conflict to the user.
Picking an ancestor arbitrarily would pick A a quarter of the time, B a
quarter of the time, a regular conflict a quarter of the time, and an
ambiguous clean conflict a quarted of the time. That doesn't seem like
good behavior either. The most seeming coherent algorithm for this case
would be to use a list and require that an alternate name have *all* of
the last modifieds in its history to win. That would cause a lot of
seemingly unnecessary merges in the first example case above though.

-Bram


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
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