TWiki::Merge $arev - rev for $a (string)
$a - first ('original') string
$brev - rev for $b (string)
$b - second ('new') string
$sep = separator, string RE e.g. '.*?\n' for lines
$session - TWiki object
$info - data block passed to plugins merge handler. Conventionally this will identify the source of the text being merged (the source form field, or undef for the body text)
"\\n", a line-by-line merge will be done.
Where conflicts exist, they are marked using HTML <del> and
<ins> tags. <del> marks content from $a while <ins>
marks content from $b.
Non-conflicting content (insertions from either set) are not
marked.
The plugins mergeHandler is called for each merge.
Call it like this:
$newText = TWiki::Merge::merge2( $oldrev, $old, $newrev, $new, '.*?\n', $session, $info );
"\\n", a line-by-line merge will be done.
$sep characters are retained in the outout.
$arev - rev for common ancestor (id e.g. ver no)
$a - common ancestor
$brev - rev no for first derivative string (id)
$b - first derivative string
$crev - rev no for second derivative string (id)
$c - second derivative string
$sep = separator, string RE e.g. '.*?\n' for lines
$session - TWiki object
$info - data block passed to plugins merge handler. Conventionally this will identify the source of the text being merged (the source form field, or undef for the body text)
".*?\\n", a line-by-line merge will be done.
Where conflicts exist, they are labeled using the provided revision
numbers.
The plugins mergeHandler is called for each merge.
Here's a little picture of a 3-way merge:
a <- ancestor
/ b c <- revisions
\ /
d <- merged result, returned.
call it like this:
my ( $ancestorMeta, $ancestorText ) =
$store->readTopic( undef, $webName, $topic, $originalrev );
$newText = TWiki::Merge::merge3(
$ancestorText, $prevText, $newText,
$originalrev, $rev, "new",
'.*?\n' );
|
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiMergeDotPm. |