|
Class: ChangeSet
Object
|
+--Collection
|
+--SequenceableCollection
|
+--OrderedCollection
|
+--ChangeSet
- Package:
- stx:libbasic3
- Category:
- System-Changes
- Version:
- rev:
1.352
date: 2024/03/09 08:02:47
- user: cg
- file: ChangeSet.st directory: libbasic3
- module: stx stc-classLibrary: libbasic3
used in the changes management to keep track of changes
copyrightCOPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
Compatibility-Squeak
-
uniqueNameLike: baseName
( an extension from the stx:libcompat package )
-
Compatibility-VW
-
component: component definition: anObject change: changeSymbol
-
Include indication that a class/namespace was added or removed
from a CodeComponent.
-
patches
-
instance creation
-
forExistingClass: aClass
-
build a changeSet for some given class, all of its private classes
and all extensions if any.
I.e. a changeSet which represents the existing class in the image.
That does of course not give deltas, but instead reflects the current
state of the given class.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets, comparing etc.
Usage example(s):
ChangeSet forExistingClass:ChangeSet
ChangeSet forExistingClass:A
Rectangle hasExtensions
ChangeSet forExistingClass:Rectangle
|
-
forExistingClass: aClass withExtensions: withExtensions
-
build a changeSet for some given full class with or without extensions.
That does of course not give deltas, but instead reflects the current
state of the given class.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets etc.
Usage example(s):
Object hasExtensions
Object extensions size
(ChangeSet forExistingClass:Object) size
(ChangeSet forExistingClass:Object withExtensions:false) size
(ChangeSet forExistingClass:stx_libbasic3 withExtensions:false)
|
-
forExistingClass: aClass withExtensions: withExtensions extensionsOnly: extensionsOnly
-
build a changeSet for some given full class, the base-class or the extensions only,
as specified by the with-arguments.
That does of course not give deltas, but instead reflects the current
state of the given class.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets etc.
Usage example(s):
ChangeSet forExistingClass:ChangeSet
Rectangle hasExtensions
Rectangle extensions
ChangeSet forExistingClass:Rectangle withExtensions:true extensionsOnly:false
ChangeSet forExistingClass:Rectangle withExtensions:false extensionsOnly:false
ChangeSet forExistingClass:Rectangle withExtensions:false extensionsOnly:true
|
-
forExistingClass: aClass withExtensions: withExtensions withLooseMethods: withLooseMethods
-
build a changeSet for some given full class with or without extensions.
That does of course not give deltas, but instead reflects the current
state of the given class.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets etc.
Usage example(s):
Object hasExtensions
Object extensions size
(ChangeSet forExistingClass:Object) size
(ChangeSet forExistingClass:Object withExtensions:false) size
(ChangeSet forExistingClass:stx_libbasic3 withExtensions:false)
|
-
forExistingClass: aClass withExtensions: withExtensions withLooseMethods: withLooseMethods extensionsOnly: extensionsOnly
-
build a changeSet for some given full class, the base-class or the extensions only,
as specified by the with-arguments.
That does of course not give deltas, but instead reflects the current
state of the given class.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets etc.
Usage example(s):
ChangeSet forExistingClass:ChangeSet
Rectangle hasExtensions
Rectangle extensions
ChangeSet forExistingClass:Rectangle withExtensions:true extensionsOnly:false
ChangeSet forExistingClass:Rectangle withExtensions:false extensionsOnly:false
ChangeSet forExistingClass:Rectangle withExtensions:false extensionsOnly:true
|
-
forExistingMethods: aCollectionOfMethods
-
build a changeSet for a collection of methods in the image.
That does of course not give deltas, but instead reflects the current
state of the given set of methods.
It is useful in conjunction with the other utility methods,
for example, when building patchLists, diffSets etc.
Usage example(s):
ChangeSet forExistingMethods:(Array with:(Array compiledMethodAt:#at:)
with:(Object compiledMethodAt:#at:)
with:(Behavior compiledMethodAt:#compiledMethodAt:) )
|
-
forPackage: pkg
-
build a changeSet for a given package in the image
-
forPackage: pkg ignoreAutoloaded: ignoreAutoloaded
-
build a changeSet for a given package in the image
-
fromBeeStream: aStream
-
build a changeSet from a Bee Smalltalk .bsc format stream, containing chunks.
Return the changeSet.
-
fromBeeStream: aStream while: aConditionBlock
-
build a changeSet from a Bee Smalltalk .bsc stream, containing chunks
Pass each change to the conditionBlock and stop whenever that
returns false. This allows skipping reamaining chunks, and speeding up
reading, if only parts need to be extracted
(for example: only documentation methods).
Return the changeSet.
-
fromCUISStream: aStream
-
build a changeSet from a CUIS Smalltalk format stream, containing chunks.
Return the changeSet.
Usage example(s):
self fromCUISStream:('C:\Users\cg\work_mingw\stx\goodies\sound\siren9\original\Siren9C-main\Siren9C_Sources_Cuis\Music-Events.st'
asFilename readStream).
|
-
fromCUISStream: aStream while: aConditionBlock
-
build a changeSet from a CUIS Smalltalk stream, containing chunks
Pass each change to the conditionBlock and stop whenever that
returns false. This allows skipping reamaining chunks, and speeding up
reading, if only parts need to be extracted
(for example: only documentation methods).
Return the changeSet.
Usage example(s):
self fromCUISStream:('C:\Users\cg\work_mingw\stx\goodies\sound\siren9\original\Siren9C-main\Siren9C_Sources_Cuis\Music-Events.st'
asFilename readStream).
|
-
fromDiffSet: aDiffSet
-
build a changeSet from a given diffSet. This can be used as a patchSet,
to update the first-version in the diffSet to the second-version
-
fromDirectory: aStringOfFilename
-
Read all .st files (non-recursively) from `aStringOrFilename`.
Return the resuling ChangeSet
-
fromDirectory: aStringOfFilename asSmalltalkXPackage: isSmalltalkXPackage
-
Read all .st files (non-recursively) from `aStringOrFilename`
Return the resuling ChangeSet.
If `isSmalltalkXPacklage` is true, then treat directory as Smalltalk/X
package directory as checked out from a VCS. Read only those files
present in abbrev.stc (if present).
-
fromDirectory: aStringOrFilename filter: filter
-
Read all files (non-recursively) from `aStringOrFilename` for which the
filter return true. Return the resuling ChangeSet
Usage example(s):
ChangeSet fromDirectory: (Smalltalk getPackageDirectoryForPackage:'stx:libbasic')
|
-
fromDolphinPACStream: aStream
-
build a changeSet from a stream, containing dolphin pac file chunks.
-
fromDolphinPACStream: aStream while: aConditionBlock
-
build a changeSet from a stream, containing dolphin pac file chunks.
Pass each change to the conditionBlock and stop whenever that
returns false. This allows skipping reamaining chunks, and speeding up
reading, if only parts need to be extracted
(for example: only documentation methods).
-
fromFile: filenameOrString
-
build a changeSet from a file, which contains chunks.
(i.e. either a classes sourceFile or a change-file).
Return the changeSet.
Usage example(s):
ChangeSet fromFile: 'st.chg'
ChangeSet fromFile: 'patches'
|
-
fromFileOrDirectory: fileOrDirectory
-
Read either a single .st-file, or all .st files (non-recursively) in a directory.
Return the resuling ChangeSet
Usage example(s):
ChangeSet fromFileOrDirectory: (Smalltalk getPackageDirectoryForPackage:'stx:libbasic')
|
-
fromGNUSmalltalkStream: aStream
-
build a changeSet from a GNU Smalltalk .gst format stream, containing a class definition.
Return the changeSet.
-
fromGithubFolder: aDirectoryName
-
build a changeSet from a GitHub format directory,
containing a class or extension definitions.
See eg. https://github.com/CampSmalltalk/Cypress
as an example.
Return the changeSet.
Usage example(s):
self fromGithubFolder:
'C:\Users\cg\Downloads\cypress\Cypress-master\implementations\smalltalkx\packages\stx_goodies_cypress.package\Array.extension\instance'
|
-
fromGithubPharoSmalltalkStream: aStream
-
build a changeSet from a Pharo GitHub format stream,
containing a class or extension definition.
See https://github.com/bouraqadi/PharoJS/Pharo
as an example.
Return the changeSet.
Usage example(s):
self fromGithubPharoSmalltalkStream:
'/Users/cg/Downloads/smalltalk/PharoJS-master/Pharo/PharoJsBridgeTest/PjBasicTest.class.st'
asFilename readStream
self fromGithubPharoSmalltalkStream:
'/Users/cg/Downloads/smalltalk/PharoJS-master/Pharo/PharoJsCoreLibraries/PjStack.class.st'
asFilename readStream
|
-
fromSIFStream: aStream
-
build a changeSet from a SIF stream, containing chunks
in smalltalk interchange format.
Return the changeSet.
-
fromSIFStream: aStream while: aConditionBlock
-
build a changeSet from a SIF stream, containing chunks
in smalltalk interchange format.
Pass each change to the conditionBlock and stop whenever that
returns false. This allows skipping reamaining chunks, and speeding up
reading, if only parts need to be extracted
(for example: only documentation methods).
Return the changeSet.
-
fromStream: aStream
-
build a changeSet from a stream, containing chunks.
(i.e. either a classes sourceFile or a change-file).
Return the changeSet.
Usage example(s):
ChangeSet fromStream:('changes' asFilename readStream)
ChangeSet fromStream:('patches' asFilename readStream)
ChangeSet fromStream:(Object source asString readStream)
|
-
fromStream: aStream while: aConditionBlock
-
build a changeSet from a stream, containing chunks.
(i.e. either a classes sourceFile or a change-file).
Pass each change to the conditionBlock and stop whenever that returns false.
This allows skipping remaining chunks,
and thus speeding up reading, if only parts need to be extracted
(for example: only documentation methods,
or espcially if only class definition changes up to the first method change are required).
Returns the changeSet.
Usage example(s):
ChangeSet fromStream:('changes' asFilename readStream)
ChangeSet fromStream:('patches' asFilename readStream)
ChangeSet fromStream:(Object source asString readStream)
ChangeSet fromStream:(XWorkstation source asString readStream)
|
-
fromXMLStream: aStream
-
build a changeSet from an XML stream, containing XML change definitions in VisualWorks XML change file format.
Return the changeSet.
Usage example(s):
ChangeSet fromXMLStream:('../../goodies/xml/vw/xmlFileInTests/XMLParser.xml' asFilename readStream)
ChangeSetBrowser
openOn:(ChangeSet fromXMLStream:('../../goodies/xml/vw/xmlFileInTests/XMLParser.xml' asFilename readStream))
|
instance creation-private
-
changesFromStream: aStream do: aBlock
-
enumerate changes from a stream and invoke aBlock on each.
The block is invoked with the change, a lineNumberOrNil and streamPosition arguments.
The lineNumber is only valid, if the underlying stream
provides line-numbers; otherwise, nil is passed.
Usage example(s):
ChangeSet
changesFromStream:('changes' asFilename readStream)
do:[:chg | Transcript showCR:chg]
|
-
changesFromStream: aStream for: aChangeSet reader: aReader do: aBlock
-
enumerate changes from a stream and invoke aBlock on each.
The block is invoked with the change, a lineNumberOrNil and streamPosition arguments.
The lineNumber is only valid, if the underlying stream
provides line-numbers; otherwise, nil is passed.
queries
-
current
-
ST-80 compatibility: return the current changeSet
Usage example(s):
-
current: aChangeSet
-
ST-80 compatibility: set the current changeSet
signal access
-
invalidChangeChunkError
-
utilities
-
decodedStreamFor: aStream
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
Compatibility-ST80
-
changeClass: aClass
-
dummy here
-
changeSelectors
-
return a collection (a set) of all selectors for which changes are in this changeSet
Usage example(s):
ChangeSet current changeSelectors
|
-
changedClassNames
-
return a collection of all classNames for which changes are in this changeSet;
for metaclasses, there will be entries named 'XXX class' as strings in the returned collection
Usage example(s):
ChangeSet current changedClassNames
|
-
changedClasses
-
return a collection of all classes for which changes are in this changeSet
Usage example(s):
ChangeSet current changedClasses
ChangeSet current flushChangedClassesCache
|
-
component: component definition: anObject change: changeSymbol
-
Include indication that a class/namespace was added or removed
from a CodeComponent.
-
reorganizeSystem
-
dummy here
accessing
-
name
-
-
name: aString
-
Modified (format): / 28-07-2012 / 09:34:52 / cg
change & update
-
changed: anAspectSymbol with: aParameter
-
Allow objects to depend on the ChangeSet class instead of a particular instance
of ChangeSet (which may be switched using projects).
changes management
-
addClassCommentChangeFor: aClass
-
add a classComment change to the receiver
-
addClassDefinitionChangeFor: aClass
-
add a classDefinition change to the receiver
Usage example(s):
(ChangeSet new addClassDefinitionChangeFor:ChangeSet) inspect
|
-
addClassRemoveChange: oldClass
-
add a classRemove change to the receiver
-
addClassRenameChangeFrom: oldName to: newName
-
add a classRename change to the receiver
-
addDoIt: aString
-
add a doIt to the receiver
-
addInstVarDefinitionChangeFor: aClass
-
add an instVarDefinition change to the receiver
-
addMethodCategoryChange: aMethod category: newCategory in: aClass
-
add a methodCategory change to the receiver
-
addMethodChange: aMethod fromOld: oldMethod in: aClass
-
add a method change to the receiver
-
addMethodChange: aMethod in: aClass
-
add a method change to the receiver
-
addMethodPackageChange: aMethod package: newPackage in: aClass
-
add a methodPackage change to the receiver
-
addMethodPrivacyChange: aMethod in: aClass
-
add a methodPrivacy change to the receiver
-
addPrimitiveDefinitionsChangeFor: aClass
-
add a primitiveDefinitions change to the receiver
-
addPrimitiveFunctionsChangeFor: aClass
-
add a primitiveFunctions change to the receiver
-
addPrimitiveVariablesChangeFor: aClass
-
add a primitiveVariables change to the receiver
-
addRemoveSelectorChange: aSelector fromOld: oldMethod in: aClass
-
add a method-remove change to the receiver
-
addRenameCategoryChangeIn: aClass from: oldCategory to: newCategory
-
add a category rename change to the receiver
enumerating
-
rejectAllVersionMethodChanges
-
Return a new ChangeSet without version_XXX methods
fileIn / fileOut
-
fileInFrom: aStream
-
-
fileInFrom: aStream while: aConditionBlock
-
-
fileOutAs: aStringOrFilename
-
-
fileOutOn: stream
-
inspecting
-
inspector2TabBrowser
( an extension from the stx:libtool package )
-
another tab browsing the changeset
misc
-
addPatch: nameOfPatch
-
ignored for now - allows fileIn of ST-80 patch stuff ..
private
-
flattenOnto: aCollection
( an extension from the stx:libtool package )
-
-
flattenedChanges
( an extension from the stx:libtool package )
-
private-accessing
-
addChange: aChange
-
aChange sendChangeNotificationThroughSmalltalk.
-
flushChangedClassesCache
-
ChangeSet current flushChangedClassesCache
-
rememberChangedClass: aClass
-
-
removeAll: aCollection
-
(comment from inherited method)
remove all elements from the receiver which are equal to any in aCollection.
Return the argument, aCollection.
Raises an error, if some element-to-remove is not in the receiver.
(see also: #removeAllFoundIn:, which does not raise an error).
Notice: for some collections (those not tuned for
resizing themself) this may be very slow.
If the number of removed elements is big compared to
the receiver's size, it may be better to copy the
ones which are not to be removed into a new collection.
-
unrememberChangedClasses
-
queries
-
changedPackages
-
return a collection of all packages for which changes are in this changeSet
Usage example(s):
Usage example(s):
ChangeSet current changedPackages
|
-
changesForClass: aClass selector: selector
-
return a collection of all changes for a particular method
Usage example(s):
ChangeSet current changesForClass:ChangeSet selector:#includesChangeForClass:
ChangeSet current changesForClass:ImageEditor class selector:#maskSpec
|
-
changesForPackage: aPackageSymbol
-
return a collection of all changes for a particular package
Usage example(s):
ChangeSet current changesForPackage:#'stx:goodies/libsvn'
|
-
classDefinitionChanges
-
return a collection of all class definition changes
-
includesChangeForClass: aClass
-
ChangeSet current includesChangeForClass:ChangeSet
ChangeSet current includesChangeForClass:ChangeSet class
ChangeSet current includesChangeForClass:SourceCodeManagerUtilities
ChangeSet current includesChangeForClass:(Expecco::ExpeccoXMLDecoder::ObjectCreator)
-
includesChangeForClass: aClass selector: selector
-
ChangeSet current includesChangeForClass:ChangeSet selector:#includesChangeForClass:
ChangeSet current includesChangeForClass:ImageEditor class selector:#maskSpec
-
includesChangeForClassNamed: aClassName
-
ChangeSet current includesChangeForClassNamed:'ChangeSet'
-
includesChangeForClassOrMetaclass: aClass
-
-
includesChangeForClassOrMetaclassOrPrivateClassOf: aClass
-
Modified (format): / 25-07-2012 / 16:50:26 / cg
-
includesChangeForClassOrMetaclassOrPrivateClassOfAny: aCollectionOfClasses
-
-
includesChangeForPackage: aPackageID
-
^ self anySatisfy:[:aChange | aChange package = aPackageID]
Usage example(s):
ChangeSet current includesChangeForPackage:'stx:libbasic'
|
-
includesChangeForSelector: selector
-
-
includesChangeForSelectorMatching: aGLOBPattern
-
-
methodDefinitionChangesForClassNamed: aClassName
-
-
selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom: aCollectionOfClasses
-
return the set of classes from a given collection, for which I have changes.
-
selectForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom: aCollectionOfClasses
-
select changes for one of a given class.
Returns a collection of changes
utilities
-
apply
-
apply all changes in the receiver's changeSet
-
applyWithInfoOn: aStream
-
apply all changes in the receiver's changeSet
-
condenseChanges
-
remove previous (older) changes which got obsoleted by newer ones;
that is: a method change, if there are more changes later for the same method,
or class definition changes, if the class has more definition changes later,
etc.
-
condenseChanges: changesToRemove
-
remove the given changes - a helper for the rest of the condense protocol
-
condenseChangesForClass: aClass
-
remove all changes for aClass (and its metaclass)
(i.e. leave changes for other classes).
-
condenseChangesForClass: aClass package: aPackageSymbolOrNil
-
remove all changes for aClass (and its metaclass) and aPackageSymbol
(i.e. leave methodChanges for other packages).
This is invoked when a class is checked into the repository.
-
condenseChangesForClass: aClass selector: aSelector
-
remove all changes for aClass >> selector.
-
condenseChangesForClass: aClass selector: selectorOrNil package: aPackageSymbolOrNil
-
remove all changes for aClass/selector and aPackageSymbol
(i.e. leave methodChanges for other packages).
If selectorOrNil is nil, all changes for that class (or metaclass) are removed;
otherwise, only changes for the given selector.
This is invoked when a class is checked into the repository.
-
condenseChangesForExtensionsInPackage: aPackageSymbol
-
remove all changes for aClass and aPackageSymbol
(i.e. leave methodChanges for other packages).
This is invoked when a class is checked into the repository.
-
condenseChangesForPackage: aPackageSymbol
-
remove all changes for aPackageSymbol
This is invoked when a project is checked into the repository.
-
condenseChangesForRemoved
( an extension from the stx:libtool package )
-
remove all changes which have been removed
(marked for removal by aChange removed: true)
-
diffSetsAgainst: anotherChangeSet
-
walk over the receiver and anotherChangeSet,
add all changes to one of the tree lists:
onlyInReceiver, onlyInArg or changed,
each being a changeSet containing corresponding changes.
WARNING:
destructive; could modify both the receiver and the argument by possibly
changing methodChanges into categoryChanges
-
diffSetsAgainst: anotherChangeSet comparingDifferentClasses: comparingDifferentClasses
-
walk over the receiver and anotherChangeSet,
add all changes to one of the tree lists:
onlyInReceiver, onlyInArg or changed,
each being a changeSet containing corresponding changes.
If comparingDifferentClasses is false, changes to different classes will
generate onlyInA/onlyInB changes; eg. changes for the same selector will be
listed on either side.
If it is true, we are comparing two different classes, and selectors present in
both will be listed as different (or even as the same).
WARNING:
destructive; could modify both the receiver and the argument by possibly
changing methodChanges into categoryChanges.
-
diffSetsAgainstImage
-
-
flatten
-
return a flat changeset from a changeset which may contain compositeChanges
-
groupBy: groupBlock labelAs: labelBlock
-
returns a new changeset consisting of CompositeChanges.
Changes are grouped together by value (tag) of groupBlock.
Each composite change is then labeled using label
returned by labelBlock (called with the tag returned
by groupBlock as arg)
-
groupBy: groupBlock labelAs: labelBlock sort: doSort
-
returns a new changeset consisting of CompositeChanges.
Changes are grouped together by value (tag) of groupBlock.
Each composite change is then labeled using label
returned by labelBlock (called with the tag returned
by groupBlock as arg)
-
groupByClass
-
-
saveSignedToFile: aFilename
-
write the changeSet to a signed file in chunk format
-
saveSignedToFile: aFilename format: formatSymbolOrNil
-
write the changeSet to a signed file in some format.
Sign with the exept key (which you do not have outside of exept!).
formatSymbolOrNil is passed to saveToStream:s format:formatSymbolOrNil,
and specifies which fileOut format to use.
Nil means: chunk format (currently, the only supported)
-
saveToFile: aFilename
-
write the changeSet to a regular file in chunk format
-
saveToFile: aFilename format: formatSymbolOrNil
-
Writes the changeSet to a regular file in some format.
Supported formats are:
nil ............ chunk changeset file
#classSource ... class fileout format, assumes that
the receiver is a changeset containing
single class (possibly with its private
classes)
-
saveToStream: aStream format: formatSymbolOrNil
-
Writes the changeSet to a stream in some format.
Supported formats are:
nil ............ chunk changeset file format
#classSource ... class fileout format, assumes that
the receiver is a changeset containing
single class (possibly with its private
classes)
-
sortedByClassName
-
returns a new changeset containing the changes sorted by class names
BeeChangeFileReader
CUISChangeFileReader
ChangeFileReader
ChangeFileWriter
ChangePair
ChangeProcessingError
ClassSourceWriter
DiffSet
DolphinPACFileReader
GNUSmalltalkFileReader
GithubFolderFileReader
GithubPharoSmalltalkFileReader
InvalidChangeChunkError
SIFChangeFileReader
|