Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ The Pharo 13 surface currently provides:
- `RePullUpInstanceVariableRefactoring` mapped to the available pull-up refactoring class.
- `FileStream` mapped to the available standard I/O class when needed.
- `IceBranchAlreadyExists` mapped to `IceBranchAlreadyExistsError` when needed.
- `EpMonticelloVersionSave` and `EpMonticelloVersionsLoad` on Pharo 14.
- `MetacelloProjectRegistry>>registrationForClassNamed:ifAbsent:` on Pharo 14.
- A Pharo 13-compatible `ReClassRepackagingChange>>generateChanges` behavior on Pharo 14.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ PharoCompatibilityP13SurfacePharo14Test >> testInstallPharo13SurfaceProvidesLega
equals: (Smalltalk at: #IceBranchAlreadyExistsError)
]

{ #category : 'tests' }
PharoCompatibilityP13SurfacePharo14Test >> testInstallPharo13SurfaceProvidesMonticelloEpiceaEvents [

| loadEvent saveEvent |
PharoCompatibility installPharo13Surface.
self assert: (Smalltalk includesKey: #EpMonticelloVersionSave).
self assert: (Smalltalk includesKey: #EpMonticelloVersionsLoad).
saveEvent := EpMonticelloVersionSave versionName: 'Example-Core.42' repositoryDescription: 'repository'.
loadEvent := EpMonticelloVersionsLoad versionNames: #( 'Example-Core.42' 'Example-Spec.7' ).
self assert: saveEvent isMonticelloVersionSave.
self assert: loadEvent isMonticelloVersionsLoad.
self assert: saveEvent affectedPackageName equals: 'Example'.
self assert: loadEvent affectedPackageName equals: 'Example'
]

{ #category : 'tests' }
PharoCompatibilityP13SurfacePharo14Test >> testMetacelloRegistryUnderstandsRegistrationForClassNamed [

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
"
I represent a Monticello ""Save Version"" operation from the Pharo 13 Epicea surface.
"
Class {
#name : 'EpMonticelloVersionSave',
#superclass : 'EpEvent',
#instVars : [
'versionName',
'repositoryDescription'
],
#category : 'PharoCompatibility-Pharo13Surface-Pharo14-Epicea',
#package : 'PharoCompatibility-Pharo13Surface-Pharo14',
#tag : 'Epicea'
}

{ #category : 'instance creation' }
EpMonticelloVersionSave class >> version: aMCVersion repository: aMCRepository [

^ self versionName: aMCVersion info name repositoryDescription: aMCRepository description
]

{ #category : 'instance creation' }
EpMonticelloVersionSave class >> versionName: aVersionName repositoryDescription: aRepositoryDescription [

^ self basicNew
initializeWithVersionName: aVersionName repositoryDescription: aRepositoryDescription;
yourself
]

{ #category : 'comparing' }
EpMonticelloVersionSave >> = another [

^ self class = another class and: [
self versionName = another versionName and: [ self repositoryDescription = another repositoryDescription ] ]
]

{ #category : 'visitor' }
EpMonticelloVersionSave >> accept: aChangeVisitor [

^ aChangeVisitor visitMonticelloVersionSave: self
]

{ #category : 'accessing' }
EpMonticelloVersionSave >> affectedPackageName [

^ self packageName
]

{ #category : 'comparing' }
EpMonticelloVersionSave >> hash [

^ (self class hash bitXor: self versionName hash) bitXor: self repositoryDescription hash
]

{ #category : 'initialization' }
EpMonticelloVersionSave >> initializeWithVersionName: aVersionName repositoryDescription: aRepositoryDescription [

self initialize.
versionName := aVersionName.
repositoryDescription := aRepositoryDescription
]

{ #category : 'testing' }
EpMonticelloVersionSave >> isMonticelloVersionSave [

^ true
]

{ #category : 'accessing' }
EpMonticelloVersionSave >> packageName [

^ versionName copyUpToLast: $-
]

{ #category : 'printing' }
EpMonticelloVersionSave >> printOn: aStream [

super printOn: aStream.
aStream
nextPut: $(;
nextPutAll: repositoryDescription;
nextPut: $/;
nextPutAll: versionName;
nextPut: $)
]

{ #category : 'accessing' }
EpMonticelloVersionSave >> repositoryDescription [

^ repositoryDescription
]

{ #category : 'accessing' }
EpMonticelloVersionSave >> versionName [

^ versionName
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
"
I represent a Monticello ""Load Versions"" operation from the Pharo 13 Epicea surface.
"
Class {
#name : 'EpMonticelloVersionsLoad',
#superclass : 'EpEvent',
#instVars : [
'versionNames'
],
#category : 'PharoCompatibility-Pharo13Surface-Pharo14-Epicea',
#package : 'PharoCompatibility-Pharo13Surface-Pharo14',
#tag : 'Epicea'
}

{ #category : 'instance creation' }
EpMonticelloVersionsLoad class >> versionNames: aCollectionOfVersionNames [

^ self basicNew
initializeWith: aCollectionOfVersionNames;
yourself
]

{ #category : 'instance creation' }
EpMonticelloVersionsLoad class >> versions: aCollectionOfVersions [

^ self versionNames: (aCollectionOfVersions collect: [ :version | version info name ])
]

{ #category : 'comparing' }
EpMonticelloVersionsLoad >> = anObject [

^ self class = anObject class and: [ self versionNames = anObject versionNames ]
]

{ #category : 'visitor' }
EpMonticelloVersionsLoad >> accept: aChangeVisitor [

^ aChangeVisitor visitMonticelloVersionsLoad: self
]

{ #category : 'accessing' }
EpMonticelloVersionsLoad >> affectedPackageName [

^ self packageNames first
]

{ #category : 'comparing' }
EpMonticelloVersionsLoad >> hash [

^ self class hash bitXor: self versionNames hash
]

{ #category : 'initialization' }
EpMonticelloVersionsLoad >> initializeWith: aCollectionOfVersionNames [

self initialize.
versionNames := aCollectionOfVersionNames
]

{ #category : 'testing' }
EpMonticelloVersionsLoad >> isMonticelloVersionsLoad [

^ true
]

{ #category : 'accessing' }
EpMonticelloVersionsLoad >> packageNames [

^ versionNames collect: [ :each | each copyUpToLast: $- ]
]

{ #category : 'printing' }
EpMonticelloVersionsLoad >> printOn: aStream [

super printOn: aStream.
versionNames printElementsOn: aStream
]

{ #category : 'accessing' }
EpMonticelloVersionsLoad >> versionNames [

^ versionNames
]
Loading