eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Diff3':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Diff3


Inheritance:

   Object
   |
   +--Diff3

Package:
stx:libtool
Category:
Collections-Sequenceable-Diff
Version:
rev: 1.5 date: 2021/01/20 13:19:39
user: cg
file: Diff3.st directory: libtool
module: stx stc-classLibrary: libtool

Description:


Diff3 provides a three-way-merge algorithm suitable for performing textual merges, 
such as are often required as part of source-code version control systems.

Instance Variables
    diffClass:      <Class> Should be a subclass of GenericDiff. Used to resolve changes.
    file0:          <SequenceableCollection> The ancestral file.
    file1:          <SequenceableCollection> The left branch.
    file2:          <SequenceableCollection> The right branch.


[instance variables:]

[class variables:]

copyright

Copyright (c) 2007-2012 Tony Garnock-Jones This code is based on Squeak's DiffMerge package written by Tony Garnock-Jones. Original project's web site: http://www.squeaksource.com/DiffMerge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Instance protocol:

accessing
o  diffClass
Modified (format): / 16-03-2012 / 20:27:28 / Jan Vrany <jan.vrany@fit.cvut.cz>

o  diffClass: anObject

o  file0

o  file0: anObject

o  file1

o  file1: anObject

o  file2

o  file2: anObject

o  fileAt: side
Given a side (#left, #original or #right), returns the
corresponding file

merging
o  diffIndices
Returns an Array of Diff3Chunks (representing clean merges) or Diff3Conflicts
(containing DiffChunks, representing conflicts), together representing the
results of a three-way merge between file1/file0/file2. Does not detect
'false conflicts', and can return two Diff3Chunks next to each other in
the result.

o  merge
Returns an Array of (#ok -> {...}) or (#conflict -> Diff3Conflict
of collections) instances representing the results of a three-way
merge between file1/file0/file2. Does not optimistically treat
'false conflicts' as clean merges (see the class comment for
Diff3InclusiveVisitor).

o  mergeClean
Returns an Array of (#ok -> {...}) or (#conflict -> Diff3Conflict of
collections) instances representing the results of a three-way merge
between file1/file0/file2. Optimistically treats 'false conflicts'
as clean merges (see the class comment for Diff3ExclusiveVisitor).

o  mergeIndices
Returns an Array of Diff3Chunks (representing clean merges) or Diff3Conflicts
(containing DiffChunks, representing conflicts), together representing the
results of a three-way merge between file1/file0/file2. Does not detect
'false conflicts', and can return two Diff3Chunks next to each other in
the result.

o  mergeIndicesDiscardEmpty: discardEmpty
Returns an Array of Diff3Chunks (representing clean merges) or Diff3Conflicts
(containing DiffChunks, representing conflicts), together representing the
results of a three-way merge between file1/file0/file2. Does not detect
'false conflicts', and can return two Diff3Chunks next to each other in
the result.

If discard empty is true, empty clean merge chunks are not included

private
o  addCommonChunkTo: result between: commonOffset and: targetOffset

o  computeConflictChunk: side fromCleanMerge: hunk old: old new: new into: conflict
Hmm....we have to compare

o  computeConflictFrom: i1 to: i2 hunks: hunks

o  computeConflictFromCleanMerge: hunk

o  computeHunks

o  fileMap

o  findOverlapStartingAt: startIndex in: hunks
Modified (format): / 20-03-2012 / 18:04:47 / Jan Vrany <jan.vrany@fit.cvut.cz>

o  merge: excludeFalseConflicts


Private classes:

    Chunk
    Conflict


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:18:36 GMT