From 1778263bbcfd975c02c591be2d54b54c3a88a637 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 4 Sep 2023 12:16:46 +0200 Subject: [PATCH] Unify snapshot method with Monticello Iceberg implemented its own MCPackage>>snapshot method to modify the one of Monticello. The method of Monticello was updated to use the same change as Iceberg but also it was updated to reduce the number of categories (package-tag) manipulations. I want to check here if we could use this new version for Iceberg too as a step toward getting rid of the categories in Pharo --- Iceberg/IceWorkingCopy.class.st | 2 +- Iceberg/MCPackage.extension.st | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 Iceberg/MCPackage.extension.st diff --git a/Iceberg/IceWorkingCopy.class.st b/Iceberg/IceWorkingCopy.class.st index b1e6efe465..be188eb427 100644 --- a/Iceberg/IceWorkingCopy.class.st +++ b/Iceberg/IceWorkingCopy.class.st @@ -729,7 +729,7 @@ IceWorkingCopy >> snapshotFor: package [ IceWorkingCopy >> snapshotForPackage: aPackage [ ^ aPackage isLoaded - ifTrue: [ (MCPackage named: aPackage name) basicSnapshot ] + ifTrue: [ (MCPackage named: aPackage name) snapshot ] ifFalse: [ self referenceCommit snapshotForPackage: aPackage ] ] diff --git a/Iceberg/MCPackage.extension.st b/Iceberg/MCPackage.extension.st deleted file mode 100644 index 4f6709bb27..0000000000 --- a/Iceberg/MCPackage.extension.st +++ /dev/null @@ -1,20 +0,0 @@ -Extension { #name : #MCPackage } - -{ #category : #'*Iceberg' } -MCPackage >> basicSnapshot [ - | rPackageSet definitions categories | - rPackageSet := self packageSet. - definitions := OrderedCollection new. - categories := rPackageSet categoryNames asArray. - categories isEmpty - ifFalse: [ definitions add: (MCOrganizationDefinition categories: categories) ]. - - rPackageSet methods - do: [:ea | definitions add: ea asMCMethodDefinition]. - - rPackageSet definedClasses - do: [:ea | definitions addAll: ea classDefinitions]. - - ^ MCSnapshot fromDefinitions: definitions - -]