-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't force metadata conversion for legacy squot file
- Loading branch information
Showing
38 changed files
with
118 additions
and
113 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
src/Squot.package/SqueakWorkingCopy.class/instance/commitImportedMappers.on..st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
importing | ||
import | ||
self | ||
checkForMissingHead; | ||
importSquotContentsFromHeadCommit. | ||
self checkForMissingHead. |
9 changes: 0 additions & 9 deletions
9
...age/SqueakWorkingCopy.class/instance/importSquotContents.from.into.fallbackSerializer..st
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/Squot.package/SqueakWorkingCopy.class/instance/importSquotContentsFromCommit..st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/Squot.package/SqueakWorkingCopy.class/instance/importSquotContentsFromHeadCommit.st
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...quot.package/SqueakWorkingCopy.class/instance/serializerFromSquotContents.in.fallback..st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/Squot.package/SqueakWorkingCopy.class/instance/serializerNameFromSquotContents.in..st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
...age/SquotBrowser.class/instance/actionSwitchToCommit.displayName.updateSymbolicHeadTo..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
actions | ||
actionSwitchToCommit: aCommit displayName: aString updateSymbolicHeadTo: anotherString | ||
| workingCopy commit | | ||
| workingCopy | | ||
workingCopy := self activeWorkingCopyIfNilInformAnd: [^ self]. | ||
self warnIfImageNotClean: [^ self]. | ||
commit := aCommit. | ||
(workingCopy importSquotContentsFromCommit: commit) ifNotNil: [:newCommit | | ||
commit := newCommit. | ||
(workingCopy isSqueakBranchRef: anotherString) ifTrue: [ | ||
workingCopy updateRef: anotherString toNewCommit: commit]]. | ||
(self | ||
openDialogToMaterializeChangeSets: (workingCopy changeSetsFromImageToCommit: commit) | ||
openDialogToMaterializeChangeSets: (workingCopy changeSetsFromImageToCommit: aCommit) | ||
windowTitle: ('Switch to {1}: Load changes from the image to {1}' | ||
format: {aString})) | ||
then: [:dialog | workingCopy updateSymbolicHeadTo: anotherString]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...eSerializer.class/class/asMapperIn.at..st → ...zer.class/class/asMapperFromReference..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
mapper-importing | ||
asMapperIn: aFilesystem at: aPath | ||
asMapperFromReference: aReference | ||
| packagePath | | ||
packagePath := aPath parent. | ||
packagePath := aReference path parent. | ||
^ SquotCypressMapper | ||
package: (MCPackage named: packagePath base) | ||
path: packagePath parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/Squot.package/SquotMetadataChangeSet.class/instance/legacyReferencesIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
operations | ||
legacyReferencesIn: aFileSystem | ||
^ {self legacyMappersFileReferenceIn: aFileSystem. self legacySquotFileReferenceIn: aFileSystem}, | ||
self loadLegacySquotContentsFileReferencesIn: aFileSystem |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotMetadataChangeSet.class/instance/legacySquotFileReferenceIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
filesystem | ||
legacySquotFileReferenceIn: aFileSystem | ||
^ self mapper legacySquotFileReferenceIn: aFileSystem |
3 changes: 3 additions & 0 deletions
3
...package/SquotMetadataChangeSet.class/instance/loadLegacySquotContentsFileReferencesIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
filesystem | ||
loadLegacySquotContentsFileReferencesIn: aFileSystem | ||
^ self mapper loadLegacySquotContentsFileReferencesIn: aFileSystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/Squot.package/SquotMetadataMapper.class/instance/hasAnyFile..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
testing | ||
hasAnyFile: aFileSystem | ||
^ (self hasMetadataFile: aFileSystem) or: [self hasLegacyMappersFile: aFileSystem] | ||
^ (self hasMetadataFile: aFileSystem) | ||
or: [self hasLegacyMappersFile: aFileSystem] | ||
or: [self hasLegacySquotFile: aFileSystem] |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotMetadataMapper.class/instance/hasLegacySquotFile..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
hasLegacySquotFile: aFileSystem | ||
^ (self legacySquotFileReferenceIn: aFileSystem) exists |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotMetadataMapper.class/instance/legacySquotContentsFileBaseName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
legacySquotContentsFileBaseName | ||
^ '.squot-contents' |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotMetadataMapper.class/instance/legacySquotFilePath.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
legacySquotFilePath | ||
^ FSPath / '.squot' |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotMetadataMapper.class/instance/legacySquotFileReferenceIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
filesystem | ||
legacySquotFileReferenceIn: aFileSystem | ||
^ aFileSystem referenceTo: self legacySquotFilePath |
4 changes: 3 additions & 1 deletion
4
src/Squot.package/SquotMetadataMapper.class/instance/loadFallbackMappersFromFileSystem..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
metadata-loading | ||
loadFallbackMappersFromFileSystem: aFileSystem | ||
^ (self loadLegacyMappersFromFileSystem: aFileSystem) ifNil: [OrderedCollection new] | ||
^ (self loadMappersFromLegacyMappersFileIn: aFileSystem) | ||
ifNil: [(self loadMappersFromLegacySquotFileIn: aFileSystem) | ||
ifNil: [OrderedCollection new]] |
15 changes: 15 additions & 0 deletions
15
...MetadataMapper.class/instance/loadLegacySerializerFromSquotContentsReference.fallback..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
metadata-loading-legacy | ||
loadLegacySerializerFromSquotContentsReference: aReference fallback: aSymbol | ||
| serializerName | | ||
serializerName := self loadLegacySerializerNameFromSquotContentsReference: aReference. | ||
serializerName ifNil: [ | ||
self inform: | ||
('Warning: failed to read serializer name from {1} | ||
referenced in {2}. Assuming serializer {3}, as named in {2}.' | ||
withoutLineEndings withBlanksCondensed | ||
format: { | ||
SquotPathUtilities asString: aReference path. | ||
SquotPathUtilities asString: self legacySquotFilePath. | ||
aSymbol}). | ||
serializerName := aSymbol]. | ||
^ Environment current valueOf: serializerName |
6 changes: 6 additions & 0 deletions
6
...SquotMetadataMapper.class/instance/loadLegacySerializerNameFromSquotContentsReference..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
metadata-loading-legacy | ||
loadLegacySerializerNameFromSquotContentsReference: aReference | ||
| metadata | | ||
aReference exists ifFalse: [^ nil]. | ||
metadata := aReference readStreamDo: [:stream | STON fromStream: stream]. | ||
^ (metadata at: #serializer ifAbsent: [^ nil]) asSymbol |
4 changes: 4 additions & 0 deletions
4
...ot.package/SquotMetadataMapper.class/instance/loadLegacySquotContentsFileReferencesIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
metadata-loading-legacy | ||
loadLegacySquotContentsFileReferencesIn: aFileSystem | ||
^ ((self loadSquotContentsReferencesAndSerializersFromLegacySquotFileIn: aFileSystem) | ||
ifNil: [^ {}]) collect: #key |
9 changes: 9 additions & 0 deletions
9
...taMapper.class/instance/loadMapperFromLegacySquotContentsReference.fallbackSerializer..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
metadata-loading-legacy | ||
loadMapperFromLegacySquotContentsReference: aReference fallbackSerializer: aSymbol | ||
| serializer mapper | | ||
serializer := self loadLegacySerializerFromSquotContentsReference: aReference fallback: aSymbol. | ||
mapper := serializer asMapperFromReference: aReference. | ||
mapper ifNil: [self inform: | ||
('Warning: skipping unsupported serializer {1} at {2}.' | ||
format: {serializer name. SquotPathUtilities asString: aReference path})]. | ||
^ mapper |
4 changes: 2 additions & 2 deletions
4
...tance/loadLegacyMappersFromFileSystem..st → ...ce/loadMappersFromLegacyMappersFileIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Squot.package/SquotMetadataMapper.class/instance/loadMappersFromLegacySquotFileIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
metadata-loading-legacy | ||
loadMappersFromLegacySquotFileIn: aFileSystem | ||
^ ((self loadSquotContentsReferencesAndSerializersFromLegacySquotFileIn: aFileSystem) | ||
ifNil: [^ nil]) | ||
collect: [:referenceToSerializer | | ||
self | ||
loadMapperFromLegacySquotContentsReference: referenceToSerializer key | ||
fallbackSerializer: referenceToSerializer value] | ||
thenSelect: #notNil |
9 changes: 9 additions & 0 deletions
9
...aMapper.class/instance/loadSquotContentsReferencesAndSerializersFromLegacySquotFileIn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
metadata-loading-legacy | ||
loadSquotContentsReferencesAndSerializersFromLegacySquotFileIn: aFileSystem | ||
| reference loadOrder | | ||
reference := self legacySquotFileReferenceIn: aFileSystem. | ||
reference exists ifFalse: [^ nil]. | ||
loadOrder := reference readStreamDo: [:stream | STON fromStream: stream]. | ||
^ loadOrder associations collect: [:pathToSerializer | | path | | ||
path := (SquotPathUtilities fromString: pathToSerializer key) / self legacySquotContentsFileBaseName. | ||
(aFileSystem referenceTo: path) -> pathToSerializer value] |
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
accessing | ||
mappedPaths | ||
^ {self metadataFilePath. self legacyMappersFilePath} | ||
^ {self metadataFilePath. self legacyMappersFilePath. self legacySquotFilePath} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotSerializer.class/class/asMapperFromReference..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mapper-importing | ||
asMapperFromReference: aReference | ||
^ nil |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotSerializer.class/class/asMapperIn.at..st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.