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.4 date: 2016/10/13 23:23:39
user: cg
file: Diff3.st directory: libtool
module: stx stc-classLibrary: libtool
Author:
Tony Garnock-Jones <tonyg@lshift.com>

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:]


Related information:



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.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 19 Sep 2018 05:26:38 GMT