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...

merge.ChangeLog, specialized ChangeLog merger: msg#00000

version-control.revctrl

Subject: merge.ChangeLog, specialized ChangeLog merger

I have a specialized ChangeLog merger at

https://netfiles.uiuc.edu/brownawe/www/merge.ChangeLog/

. It makes some assumptions (mostly, that entries are unique and don't
change very much), but seems to work ok.

Those of you getting this through monotone-devel may be interested in
merge.ChangeLog.monotonerc, which calls this merger instead of whatever
it would have used when monotone needs help merging a file named
"ChangeLog".


General reasoning and how it works are below, and also in the readme
file:


ChangeLog s in general are annoying to merge, because they change with
*every* commit, and always in the form of adding lines to the top.
Occasionally other parts will change (spelling fixes, utf8 mangling by
bad editors), but not often and not by very much.

A ChangeLog has a specific format, as an ordered collection of entries.
Individual entries don't depend on eachother the way lines in source
code do, and entries are ~always unique. This makes it possible to
resolve some merge conflicts automatically, that a general text merger
can't.

Specifically it allows for better resolution of what matches what, for
"edit" changes in addition to add and delete, and for add changes at the
same place to be handled automatically (keep both and sort by date,
which the format means is a string comparison of the entries).

----------

This merger divides the ChangeLog s (left, right, anc) into entries, and
then matches entries in anc against left and right starting from the
tail of the files. (Starting from the head would mean that for each new
entry, it would have to search the entire other file looking for a
match.)

Entries are considered to be the same if they are identical, or if a
character-based diff of the entries is sufficiently smaller than the
combined sizes of the entries. ("sufficiently smaller" is 10% in this
code)

Entries in left and right which are the only match for an entry in anc
are dropped, and left and right are combined as with "sort -m", except
that entries wich are "the same" (match the same entry in ancestor, or
would end up next to eachother and match eachother) are merged and
printed as a single entry. If entries in left and right match the same
entry in anc, but would end up in different places in the output,
they're only printed in the first location.

"merged" here is, if they match the same thing in ancestor, determine
changed/not changed and have the user pick if both sides changed in
different ways. If they don't match the same thing in ancestor, have the
user pick one.

----------

Note than if an entry is changed too much (more than 10%), this will see
it as a delete+add instead of an edit. So if it's changed too much in
both sides, it will be duplicated, and if it's changed too much in one
side, any small changes in the other side are lost.

Also note that if an entry gets edited on both sides, the available
conflict resolution is "pick one". I haven't implemented text merging
for entries, and haven't implemented any sort of editing.


<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