eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Diff2::Patch':

Home

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

Class: Patch (private in Diff2

This class is only visible from within Diff2.

Inheritance:

   Object
   |
   +--Diff2::Patch

Package:
stx:libtool
Category:
Collections-Sequenceable-Diff
Owner:
Diff2

Description:


A DiffPatch has a collection of DiffChunks, and a collection of corresponding 
SequenceableCollection snippets. It can be used to patch a file (= SequenceableCollection) 
forwards or backwards.



[instance variables:]
    chunks:         <SequenceableCollection of DiffChunk->DiffChunk>
    snippets:       <SequenceableCollection of SequenceableCollection->SequenceableCollection>

[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  applyTo: file
Applies this patch to the given collection. Makes no sanity checks on the contents of the collection - simply blindly applies the chunks and snippets to its argument.

as yet unclassified
o  initChunks: c file1: f1 file2: f2

selecting
o  invert
Causes this patch to invert itself; if previously it represented the changes from file1 to file2, after being sent #invert, it will represent the changes from file2 to file1. After inversion, calling #applyTo: on file2 will yield file1, rather than the other way around.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 30 Dec 2024 17:26:53 GMT