|
Class: Diff3
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
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:]
copyrightCopyright (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.
accessing
-
diffClass
-
Modified (format): / 16-03-2012 / 20:27:28 / Jan Vrany <jan.vrany@fit.cvut.cz>
-
diffClass: anObject
-
-
file0
-
-
file0: anObject
-
-
file1
-
-
file1: anObject
-
-
file2
-
-
file2: anObject
-
-
fileAt: side
-
Given a side (#left, #original or #right), returns the
corresponding file
merging
-
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.
-
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).
-
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).
-
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.
-
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
-
addCommonChunkTo: result between: commonOffset and: targetOffset
-
-
computeConflictChunk: side fromCleanMerge: hunk old: old new: new into: conflict
-
Hmm....we have to compare
-
computeConflictFrom: i1 to: i2 hunks: hunks
-
-
computeConflictFromCleanMerge: hunk
-
-
computeHunks
-
-
fileMap
-
-
findOverlapStartingAt: startIndex in: hunks
-
Modified (format): / 20-03-2012 / 18:04:47 / Jan Vrany <jan.vrany@fit.cvut.cz>
-
merge: excludeFalseConflicts
-
Chunk
Conflict
|