Skip to content

Commit

Permalink
Merge pull request #1732 from jecisc/packages/remove-categories-usage…
Browse files Browse the repository at this point in the history
…-in-organizationdefinition

Remove usage of categories in MCOrganizationDefinition
  • Loading branch information
Ducasse authored Sep 17, 2023
2 parents f62268d + bc11b6b commit 989c418
Show file tree
Hide file tree
Showing 210 changed files with 2,897 additions and 2,638 deletions.
4 changes: 2 additions & 2 deletions Iceberg-Memory/IceChangeImporter.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #IceChangeImporter }
Extension { #name : 'IceChangeImporter' }

{ #category : #'*Iceberg-Memory' }
{ #category : '*Iceberg-Memory' }
IceChangeImporter >> visitMemoryChange: anIceMemoryChange [

| importer |
Expand Down
17 changes: 9 additions & 8 deletions Iceberg-Memory/IceMemoryChange.class.st
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
Class {
#name : #IceMemoryChange,
#superclass : #IceChange,
#name : 'IceMemoryChange',
#superclass : 'IceChange',
#instVars : [
'package'
],
#category : #'Iceberg-Memory'
#category : 'Iceberg-Memory',
#package : 'Iceberg-Memory'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
IceMemoryChange class >> on: anIcePackage [

^ self new
package: anIcePackage;
yourself
]

{ #category : #visiting }
{ #category : 'visiting' }
IceMemoryChange >> accept: aVisitor [

aVisitor visitMemoryChange: self
]

{ #category : #displaying }
{ #category : 'displaying' }
IceMemoryChange >> displayingProgressString [
^ 'Comparing memory changes of ' , self package name
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryChange >> package [
^ package
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryChange >> package: anIcePackage [

package := anIcePackage
Expand Down
47 changes: 24 additions & 23 deletions Iceberg-Memory/IceMemoryCommit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ I'm a commit that works on memory.
I'm used for testing.
"
Class {
#name : #IceMemoryCommit,
#superclass : #IceCommit,
#name : 'IceMemoryCommit',
#superclass : 'IceCommit',
#instVars : [
'mcCommit'
],
#category : 'Iceberg-Memory'
#category : 'Iceberg-Memory',
#package : 'Iceberg-Memory'
}

{ #category : #comparing }
{ #category : 'comparing' }
IceMemoryCommit >> = aCommit [

^ (self mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ])
= (aCommit mcCommit dependencies asArray sort: [ :a :b | a timeStamp > b timeStamp ])
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> ancestors [

^ self mcCommit info ancestors collect: [ :parentMcCommitInfo | | iceCommit parentMcCommit |
Expand All @@ -29,13 +30,13 @@ IceMemoryCommit >> ancestors [
iceCommit ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> author [

^ mcCommit info author
]

{ #category : #'private-changes' }
{ #category : 'private-changes' }
IceMemoryCommit >> changedPackagesToCommitInfo: aCommit [

| otherDependencies |
Expand All @@ -47,20 +48,20 @@ IceMemoryCommit >> changedPackagesToCommitInfo: aCommit [
collect: [ :each | each package ] as: Array
]

{ #category : #'private-changes' }
{ #category : 'private-changes' }
IceMemoryCommit >> changesFromCommit: anIceCommit [

^ (anIceCommit changedPackagesToCommitInfo: self)
collect: [ :package | IceMemoryChange on: package ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> comment [

^ mcCommit info message
]

{ #category : #ancestry }
{ #category : 'ancestry' }
IceMemoryCommit >> commonAncestorWithCommit: anIceMemoryCommit [

| ancestor ancestorInfo |
Expand All @@ -74,13 +75,13 @@ IceMemoryCommit >> commonAncestorWithCommit: anIceMemoryCommit [
yourself
]

{ #category : #'private-monticello' }
{ #category : 'private-monticello' }
IceMemoryCommit >> commonMCAncestorWith: anIceMemoryCommit [

^ mcCommit info commonAncestorWith: anIceMemoryCommit mcCommit info
]

{ #category : #'API-tags' }
{ #category : 'API-tags' }
IceMemoryCommit >> createTag: aString [

(self repository hasTagNamed: aString) ifTrue: [
Expand All @@ -91,13 +92,13 @@ IceMemoryCommit >> createTag: aString [
^ IceTag named: aString inRepository: self repository.
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> datetime [

^ self mcCommit info timeStamp
]

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

self mcCommit dependencies isEmpty ifTrue: [ ^ 0 hash ].
Expand All @@ -109,57 +110,57 @@ IceMemoryCommit >> hash [
fold: [ :a :b | a hash bitXor: b hash ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> id [
^ self mcCommit info id asString
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> mcCommit [
^ mcCommit
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> mcCommit: aMCVersion [
self assert: (aMCVersion isKindOf: MCVersion).
self assert: (aMCVersion dependencies allSatisfy: [ :each |
each isKindOf: IceMCVersionInfo ]).
mcCommit := aMCVersion
]

{ #category : #merging }
{ #category : 'merging' }
IceMemoryCommit >> mergeWith: anIceMemoryCommit [

^ repository workingCopy mergeCommit: anIceMemoryCommit
]

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

^ (mcCommit dependencies collect: [ :each | each package name ]) asArray
]

{ #category : #'API-project' }
{ #category : 'API-project' }
IceMemoryCommit >> project [

^ IceMemoryProject onRepository: self repository commitish: self
]

{ #category : #'API-properties' }
{ #category : 'API-properties' }
IceMemoryCommit >> properties [

^ IceRepositoryProperties
fromDictionary: Dictionary new
commitish: self
]

{ #category : #TOMOVE }
{ #category : 'TOMOVE' }
IceMemoryCommit >> snapshotFor: package [

^ (self repository mcVersionFor: (self versionFor: package)) snapshot
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryCommit >> timeStamp [

^ self mcCommit info timeStamp
Expand Down
19 changes: 10 additions & 9 deletions Iceberg-Memory/IceMemoryCommitWalk.class.st
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
Class {
#name : #IceMemoryCommitWalk,
#superclass : #IceAbstractCommitWalk,
#name : 'IceMemoryCommitWalk',
#superclass : 'IceAbstractCommitWalk',
#instVars : [
'startingPoint',
'queue'
],
#category : 'Iceberg-Memory'
#category : 'Iceberg-Memory',
#package : 'Iceberg-Memory'
}

{ #category : #walking }
{ #category : 'walking' }
IceMemoryCommitWalk >> commitsDo: aBlock [
self rawResultsDo: aBlock
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
IceMemoryCommitWalk >> fromBranch: aBranch [

self fromCommit: aBranch commit
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
IceMemoryCommitWalk >> fromCommit: anIceMemoryCommit [

queue add: anIceMemoryCommit
]

{ #category : #'instance creation' }
{ #category : 'instance creation' }
IceMemoryCommitWalk >> fromTag: anIceTag [
self shouldBeImplemented.
]

{ #category : #initialization }
{ #category : 'initialization' }
IceMemoryCommitWalk >> initialize [

super initialize.
queue := OrderedCollection new
]

{ #category : #iterating }
{ #category : 'iterating' }
IceMemoryCommitWalk >> rawResultsDo: aBlockClosure [

| current |
Expand Down
27 changes: 14 additions & 13 deletions Iceberg-Memory/IceMemoryIndex.class.st
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
Class {
#name : #IceMemoryIndex,
#superclass : #IceIndex,
#name : 'IceMemoryIndex',
#superclass : 'IceIndex',
#instVars : [
'modifiedVersions'
],
#category : 'Iceberg-Memory'
#category : 'Iceberg-Memory',
#package : 'Iceberg-Memory'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
IceMemoryIndex class >> on: anIceMemoryRepository [

^ self new
repository: anIceMemoryRepository;
yourself
]

{ #category : #adding }
{ #category : 'adding' }
IceMemoryIndex >> addPackage: anIcePackageDefinition [

"Nothing, the package should be already added"
]

{ #category : #'API-commiting' }
{ #category : 'API-commiting' }
IceMemoryIndex >> commitWithMessage: message andParents: parentCommits [

| newCommit versionInfos packageNames iceCommit head headCommit |
Expand Down Expand Up @@ -60,39 +61,39 @@ IceMemoryIndex >> commitWithMessage: message andParents: parentCommits [

]

{ #category : #initialization }
{ #category : 'initialization' }
IceMemoryIndex >> initialize [

super initialize.
modifiedVersions := Set new
]

{ #category : #testing }
{ #category : 'testing' }
IceMemoryIndex >> isEmpty [

^ modifiedVersions isEmpty
]

{ #category : #accessing }
{ #category : 'accessing' }
IceMemoryIndex >> modifiedVersions [

^ modifiedVersions
]

{ #category : #storing }
{ #category : 'storing' }
IceMemoryIndex >> storeMCVersion: aMCVersion [

repository internalStoreVersion: aMCVersion.
modifiedVersions add: aMCVersion.
]

{ #category : #storing }
{ #category : 'storing' }
IceMemoryIndex >> storeVersion: aMCVersion [

self storeMCVersion: aMCVersion
]

{ #category : #updating }
{ #category : 'updating' }
IceMemoryIndex >> updateDiskWorkingCopy: anIceDiff [

anIceDiff tree
Expand All @@ -103,7 +104,7 @@ IceMemoryIndex >> updateDiskWorkingCopy: anIceDiff [
diff: anIceDiff)
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
IceMemoryIndex >> updateProject: anIceUnbornProject [

"Nothing for now" 1halt.
Expand Down
Loading

0 comments on commit 989c418

Please sign in to comment.