From b801220dcec20754d3c6942a54c36402120b6adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20D=C3=B6rbandt?= Date: Fri, 4 Oct 2024 16:19:35 +0200 Subject: [PATCH] Treat all metadata-related files as mapped * Fix metadata files being treated as untracked files * Add SquotPathPattern to match .squot-contents files --- .../instance/mappedPathPatterns.st | 3 +++ .../instance/mappedPaths.st | 3 --- .../instance/mapperThatMaps..st | 2 +- .../instance/unmappedReferencesIn.do..st | 2 +- .../methodProperties.json | 6 +++--- .../instance/mappedPathPatterns.st | 3 +++ .../instance/mappedPaths.st | 3 --- .../methodProperties.json | 2 +- .../instance/mappedPathPatterns.st | 3 +++ .../instance/mappedPaths.st | 3 --- .../methodProperties.json | 2 +- .../{mappedPaths.st => mappedPathPatterns.st} | 2 +- .../SquotMapper.class/methodProperties.json | 2 +- .../instance/mappedPathPatterns.st | 3 +++ .../instance/unmappedReferencesIn.do..st | 2 +- .../SquotMetadata.class/methodProperties.json | 3 ++- ...asWithUntrackedMappersFromFSCommits.in..st | 8 ++++---- .../instance/mappedPathPatterns.st | 8 ++++++++ .../instance/mappedPaths.st | 3 --- ....fromFSCommits.withMappedPathPatterns..st} | 4 ++-- .../methodProperties.json | 6 +++--- .../SquotPathPattern.class/README.md | 0 .../SquotPathPattern.class/class/contains..st | 7 +++++++ .../SquotPathPattern.class/class/endsWith..st | 7 +++++++ .../class/exactMatch..st | 7 +++++++ .../class/startsWith..st | 7 +++++++ .../instance/allowLeading.st | 3 +++ .../instance/allowTrailing.st | 3 +++ .../instance/allowsLeading..st | 3 +++ .../instance/allowsLeading.st | 3 +++ .../instance/allowsTrailing..st | 3 +++ .../instance/allowsTrailing.st | 3 +++ .../instance/disallowLeading.st | 3 +++ .../instance/disallowTrailing.st | 3 +++ .../instance/matches..st | 11 +++++++++++ .../instance/matches.startingAt..st | 9 +++++++++ .../SquotPathPattern.class/instance/path..st | 3 +++ .../SquotPathPattern.class/instance/path.st | 3 +++ .../methodProperties.json | 19 +++++++++++++++++++ .../SquotPathPattern.class/properties.json | 16 ++++++++++++++++ .../class/path.collidesWith..st | 5 ----- .../class/path.collidesWithAnyOf..st | 3 --- .../class/path.containsOrEquals..st | 6 ------ .../methodProperties.json | 3 --- .../instance/isUnmapped..st | 3 +-- .../instance/mappedPathPatterns..st | 3 +++ .../instance/mappedPathPatterns.st | 3 +++ .../instance/mappedPaths..st | 3 --- .../instance/mappedPaths.st | 3 --- .../methodProperties.json | 6 +++--- .../properties.json | 2 +- 51 files changed, 165 insertions(+), 61 deletions(-) create mode 100644 src/Squot.package/SqueakWorkingCopy.class/instance/mappedPathPatterns.st delete mode 100644 src/Squot.package/SqueakWorkingCopy.class/instance/mappedPaths.st create mode 100644 src/Squot.package/SquotAssetMapper.class/instance/mappedPathPatterns.st delete mode 100644 src/Squot.package/SquotAssetMapper.class/instance/mappedPaths.st create mode 100644 src/Squot.package/SquotCodeMapper.class/instance/mappedPathPatterns.st delete mode 100644 src/Squot.package/SquotCodeMapper.class/instance/mappedPaths.st rename src/Squot.package/SquotMapper.class/instance/{mappedPaths.st => mappedPathPatterns.st} (67%) create mode 100644 src/Squot.package/SquotMetadata.class/instance/mappedPathPatterns.st create mode 100644 src/Squot.package/SquotMetadataMapper.class/instance/mappedPathPatterns.st delete mode 100644 src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st rename src/Squot.package/SquotMetadataMapper.class/instance/{shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPaths..st => shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPathPatterns..st} (53%) create mode 100644 src/Squot.package/SquotPathPattern.class/README.md create mode 100644 src/Squot.package/SquotPathPattern.class/class/contains..st create mode 100644 src/Squot.package/SquotPathPattern.class/class/endsWith..st create mode 100644 src/Squot.package/SquotPathPattern.class/class/exactMatch..st create mode 100644 src/Squot.package/SquotPathPattern.class/class/startsWith..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowLeading.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowTrailing.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowsLeading..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowsLeading.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowsTrailing..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/allowsTrailing.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/disallowLeading.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/disallowTrailing.st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/matches..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/matches.startingAt..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/path..st create mode 100644 src/Squot.package/SquotPathPattern.class/instance/path.st create mode 100644 src/Squot.package/SquotPathPattern.class/methodProperties.json create mode 100644 src/Squot.package/SquotPathPattern.class/properties.json delete mode 100644 src/Squot.package/SquotPathUtilities.class/class/path.collidesWith..st delete mode 100644 src/Squot.package/SquotPathUtilities.class/class/path.collidesWithAnyOf..st delete mode 100644 src/Squot.package/SquotPathUtilities.class/class/path.containsOrEquals..st create mode 100644 src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns..st create mode 100644 src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns.st delete mode 100644 src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths..st delete mode 100644 src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths.st diff --git a/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPathPatterns.st b/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..1e081af1c --- /dev/null +++ b/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPathPatterns.st @@ -0,0 +1,3 @@ +paths +mappedPathPatterns + ^ self allMappers gather: #mappedPathPatterns \ No newline at end of file diff --git a/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPaths.st b/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPaths.st deleted file mode 100644 index f57a3aee0..000000000 --- a/src/Squot.package/SqueakWorkingCopy.class/instance/mappedPaths.st +++ /dev/null @@ -1,3 +0,0 @@ -paths -mappedPaths - ^ self allMappers gather: #mappedPaths \ No newline at end of file diff --git a/src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..st b/src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..st index f86cbcfff..f5166a9fa 100644 --- a/src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..st +++ b/src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..st @@ -1,5 +1,5 @@ paths mapperThatMaps: aPath ^ self allMappers - detect: [:mapper | SquotPathUtilities path: aPath collidesWithAnyOf: mapper mappedPaths] + detect: [:mapper | mapper mappedPathPatterns anySatisfy: [:each | each matches: aPath]] ifNone: [nil] \ No newline at end of file diff --git a/src/Squot.package/SqueakWorkingCopy.class/instance/unmappedReferencesIn.do..st b/src/Squot.package/SqueakWorkingCopy.class/instance/unmappedReferencesIn.do..st index 02ab66d2f..cc9f63142 100644 --- a/src/Squot.package/SqueakWorkingCopy.class/instance/unmappedReferencesIn.do..st +++ b/src/Squot.package/SqueakWorkingCopy.class/instance/unmappedReferencesIn.do..st @@ -1,6 +1,6 @@ paths unmappedReferencesIn: anFSCommit do: aBlock SquotUnmappedReferencesVisitor new - mappedPaths: self mappedPaths; + mappedPathPatterns: self mappedPathPatterns; block: aBlock; show: anFSCommit filesystem root. \ No newline at end of file diff --git a/src/Squot.package/SqueakWorkingCopy.class/methodProperties.json b/src/Squot.package/SqueakWorkingCopy.class/methodProperties.json index ab80a1519..9fa662ddb 100644 --- a/src/Squot.package/SqueakWorkingCopy.class/methodProperties.json +++ b/src/Squot.package/SqueakWorkingCopy.class/methodProperties.json @@ -111,8 +111,8 @@ "isSqueakRef:" : "mad 9/18/2023 13:58", "isUnmappedPath:" : "mad 7/3/2024 15:30", "lastImageHashForMigration" : "mad 11/29/2023 15:11", - "mappedPaths" : "mad 10/21/2023 22:58", - "mapperThatMaps:" : "mad 10/2/2024 17:09", + "mappedPathPatterns" : "mad 10/4/2024 15:33", + "mapperThatMaps:" : "mad 10/4/2024 15:36", "mappers" : "mad 6/1/2023 22:35", "mappers:" : "mad 3/19/2024 21:25", "mappersOfKind:" : "mad 9/20/2023 17:29", @@ -169,7 +169,7 @@ "setUpstreamRemoteNameAndRefFor:" : "mad 12/13/2023 19:07", "splitRemoteRef:" : "mad 12/8/2023 19:45", "unitOfWork" : "mad 6/3/2023 14:15", - "unmappedReferencesIn:do:" : "mad 10/21/2023 23:37", + "unmappedReferencesIn:do:" : "mad 10/4/2024 15:34", "unregister" : "mad 9/19/2023 12:07", "update:" : "mad 5/15/2024 21:21", "updateHeadRefToNewCommit:" : "mad 4/29/2024 20:55", diff --git a/src/Squot.package/SquotAssetMapper.class/instance/mappedPathPatterns.st b/src/Squot.package/SquotAssetMapper.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..cf7d9394f --- /dev/null +++ b/src/Squot.package/SquotAssetMapper.class/instance/mappedPathPatterns.st @@ -0,0 +1,3 @@ +accessing +mappedPathPatterns + ^ {SquotPathPattern exactMatch: self path} \ No newline at end of file diff --git a/src/Squot.package/SquotAssetMapper.class/instance/mappedPaths.st b/src/Squot.package/SquotAssetMapper.class/instance/mappedPaths.st deleted file mode 100644 index 9c2e9ebc0..000000000 --- a/src/Squot.package/SquotAssetMapper.class/instance/mappedPaths.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -mappedPaths - ^ {self path} \ No newline at end of file diff --git a/src/Squot.package/SquotAssetMapper.class/methodProperties.json b/src/Squot.package/SquotAssetMapper.class/methodProperties.json index 9b8d1a9fc..6d5c74291 100644 --- a/src/Squot.package/SquotAssetMapper.class/methodProperties.json +++ b/src/Squot.package/SquotAssetMapper.class/methodProperties.json @@ -53,7 +53,7 @@ "loadAssetFileFrom:" : "mad 9/29/2024 19:35", "loadAssetFileFromImage:" : "mad 9/29/2024 16:35", "loadAssetFromImage:" : "mad 9/29/2024 17:42", - "mappedPaths" : "mad 10/21/2023 22:53", + "mappedPathPatterns" : "mad 10/4/2024 15:33", "materialize:in:" : "mad 9/29/2024 19:37", "materializeAsset:in:" : "mad 9/29/2024 17:43", "mergeAssetFile:into:withBase:" : "mad 9/29/2024 17:03", diff --git a/src/Squot.package/SquotCodeMapper.class/instance/mappedPathPatterns.st b/src/Squot.package/SquotCodeMapper.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..2f0b69766 --- /dev/null +++ b/src/Squot.package/SquotCodeMapper.class/instance/mappedPathPatterns.st @@ -0,0 +1,3 @@ +accessing +mappedPathPatterns + ^ {SquotPathPattern startsWith: self packagePath} \ No newline at end of file diff --git a/src/Squot.package/SquotCodeMapper.class/instance/mappedPaths.st b/src/Squot.package/SquotCodeMapper.class/instance/mappedPaths.st deleted file mode 100644 index b2ff8a188..000000000 --- a/src/Squot.package/SquotCodeMapper.class/instance/mappedPaths.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -mappedPaths - ^ {self packagePath} \ No newline at end of file diff --git a/src/Squot.package/SquotCodeMapper.class/methodProperties.json b/src/Squot.package/SquotCodeMapper.class/methodProperties.json index 566354c77..d2b49775c 100644 --- a/src/Squot.package/SquotCodeMapper.class/methodProperties.json +++ b/src/Squot.package/SquotCodeMapper.class/methodProperties.json @@ -21,7 +21,7 @@ "hexHashIn:" : "mad 10/1/2024 23:00", "initialize" : "mad 4/25/2023 19:41", "loadSnapshotFrom:" : "mad 10/16/2023 17:22", - "mappedPaths" : "mad 4/29/2024 22:21", + "mappedPathPatterns" : "mad 10/4/2024 15:33", "mergeCommit:into:withBase:" : "mad 10/2/2024 00:31", "operationFrom:to:" : "mad 8/13/2024 17:52", "package" : "mad 4/21/2023 23:34", diff --git a/src/Squot.package/SquotMapper.class/instance/mappedPaths.st b/src/Squot.package/SquotMapper.class/instance/mappedPathPatterns.st similarity index 67% rename from src/Squot.package/SquotMapper.class/instance/mappedPaths.st rename to src/Squot.package/SquotMapper.class/instance/mappedPathPatterns.st index ef673fa32..fb7ac38f4 100644 --- a/src/Squot.package/SquotMapper.class/instance/mappedPaths.st +++ b/src/Squot.package/SquotMapper.class/instance/mappedPathPatterns.st @@ -1,3 +1,3 @@ accessing -mappedPaths +mappedPathPatterns self subclassResponsibility. \ No newline at end of file diff --git a/src/Squot.package/SquotMapper.class/methodProperties.json b/src/Squot.package/SquotMapper.class/methodProperties.json index 40481b472..fe9641dc0 100644 --- a/src/Squot.package/SquotMapper.class/methodProperties.json +++ b/src/Squot.package/SquotMapper.class/methodProperties.json @@ -22,7 +22,7 @@ "isTracked" : "mad 9/30/2024 15:01", "isTracked:" : "mad 9/30/2024 15:01", "isUntracked" : "mad 9/30/2024 15:41", - "mappedPaths" : "mad 10/21/2023 22:52", + "mappedPathPatterns" : "mad 10/4/2024 15:33", "mergeCommit:into:withBase:" : "mad 9/6/2023 12:52", "printDescriptionOn:" : "mad 10/2/2024 20:07", "printOn:" : "mad 10/2/2024 20:07", diff --git a/src/Squot.package/SquotMetadata.class/instance/mappedPathPatterns.st b/src/Squot.package/SquotMetadata.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..f38336ac3 --- /dev/null +++ b/src/Squot.package/SquotMetadata.class/instance/mappedPathPatterns.st @@ -0,0 +1,3 @@ +accessing +mappedPathPatterns + ^ (self trackedMappers copyWith: SquotMetadataMapper new) gather: #mappedPathPatterns \ No newline at end of file diff --git a/src/Squot.package/SquotMetadata.class/instance/unmappedReferencesIn.do..st b/src/Squot.package/SquotMetadata.class/instance/unmappedReferencesIn.do..st index 5510a1ba5..e3516de55 100644 --- a/src/Squot.package/SquotMetadata.class/instance/unmappedReferencesIn.do..st +++ b/src/Squot.package/SquotMetadata.class/instance/unmappedReferencesIn.do..st @@ -1,6 +1,6 @@ untracked-mappers unmappedReferencesIn: aFileSystem do: aBlock SquotUnmappedReferencesVisitor new - mappedPaths: (self trackedMappers gather: #mappedPaths); + mappedPathPatterns: self mappedPathPatterns; block: aBlock; show: aFileSystem root \ No newline at end of file diff --git a/src/Squot.package/SquotMetadata.class/methodProperties.json b/src/Squot.package/SquotMetadata.class/methodProperties.json index 91db0f715..3e4092de0 100644 --- a/src/Squot.package/SquotMetadata.class/methodProperties.json +++ b/src/Squot.package/SquotMetadata.class/methodProperties.json @@ -13,6 +13,7 @@ "fromSton:" : "mad 8/16/2024 00:55", "hasUntrackedMappers" : "mad 9/30/2024 15:40", "hash" : "mad 9/27/2024 17:56", + "mappedPathPatterns" : "mad 10/4/2024 15:49", "mappers" : "mad 6/12/2024 13:54", "mappers:" : "mad 6/12/2024 13:54", "name" : "mad 6/12/2024 13:54", @@ -21,7 +22,7 @@ "setLegacyVersion" : "mad 8/27/2024 21:07", "stonShouldWriteNilInstVars" : "mad 8/15/2024 18:54", "trackedMappers" : "mad 9/30/2024 15:35", - "unmappedReferencesIn:do:" : "mad 10/2/2024 16:47", + "unmappedReferencesIn:do:" : "mad 10/4/2024 15:49", "version" : "mad 6/12/2024 13:54", "version:" : "mad 6/12/2024 13:55", "withAddedMappers:" : "mad 10/2/2024 16:59", diff --git a/src/Squot.package/SquotMetadataMapper.class/instance/loadMetadatasWithUntrackedMappersFromFSCommits.in..st b/src/Squot.package/SquotMetadataMapper.class/instance/loadMetadatasWithUntrackedMappersFromFSCommits.in..st index 0c0b1b134..710879716 100644 --- a/src/Squot.package/SquotMetadataMapper.class/instance/loadMetadatasWithUntrackedMappersFromFSCommits.in..st +++ b/src/Squot.package/SquotMetadataMapper.class/instance/loadMetadatasWithUntrackedMappersFromFSCommits.in..st @@ -1,10 +1,10 @@ metadata-loading loadMetadatasWithUntrackedMappersFromFSCommits: aCollection in: aWorkingCopy - | fileSystems mappedPaths metadatas unmappedPaths untrackedMappers | + | fileSystems mappedPathPatterns metadatas unmappedPaths untrackedMappers | fileSystems := aCollection collect: #filesystem. metadatas := fileSystems collect: [:fileSystem | self loadMetadataFromFileSystem: fileSystem in: aWorkingCopy]. - mappedPaths := Set new. - metadatas do: [:metadata | metadata mappers do: [:mapper | mappedPaths addAll: mapper mappedPaths]]. + mappedPathPatterns := Set new. + metadatas do: [:metadata | metadata mappers do: [:mapper | mappedPathPatterns addAll: mapper mappedPathPatterns]]. unmappedPaths := Set new. metadatas with: fileSystems do: [:metadata :fileSystem | metadata unmappedReferencesIn: fileSystem do: [:each | unmappedPaths add: each path]]. @@ -14,7 +14,7 @@ loadMetadatasWithUntrackedMappersFromFSCommits: aCollection in: aWorkingCopy (self shouldLoadUntrackedMappersAt: path fromFSCommits: aCollection - withMappedPaths: mappedPaths) ifTrue: [ + withMappedPathPatterns: mappedPathPatterns) ifTrue: [ fileSystems with: untrackedMappers do: [:fileSystem :mappers | | reference | reference := fileSystem referenceTo: path. reference exists ifTrue: [mappers add: (self untrackedMapperForReference: reference)]]]] diff --git a/src/Squot.package/SquotMetadataMapper.class/instance/mappedPathPatterns.st b/src/Squot.package/SquotMetadataMapper.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..89dd3254d --- /dev/null +++ b/src/Squot.package/SquotMetadataMapper.class/instance/mappedPathPatterns.st @@ -0,0 +1,8 @@ +accessing +mappedPathPatterns + ^ { + SquotPathPattern exactMatch: self metadataFilePath. + SquotPathPattern exactMatch: self legacyMappersFilePath. + SquotPathPattern exactMatch: self legacySquotFilePath. + SquotPathPattern endsWith: {self legacySquotContentsFileBaseName}. + } \ No newline at end of file diff --git a/src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st b/src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st deleted file mode 100644 index 98c1dc71a..000000000 --- a/src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -mappedPaths - ^ {self metadataFilePath. self legacyMappersFilePath. self legacySquotFilePath} \ No newline at end of file diff --git a/src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPaths..st b/src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPathPatterns..st similarity index 53% rename from src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPaths..st rename to src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPathPatterns..st index be57d7153..460563e3a 100644 --- a/src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPaths..st +++ b/src/Squot.package/SquotMetadataMapper.class/instance/shouldLoadUntrackedMappersAt.fromFSCommits.withMappedPathPatterns..st @@ -1,4 +1,4 @@ metadata-loading -shouldLoadUntrackedMappersAt: aPath fromFSCommits: fsCommitsCollection withMappedPaths: mappedPathsCollection - ^ (SquotPathUtilities path: aPath collidesWithAnyOf: mappedPathsCollection) +shouldLoadUntrackedMappersAt: aPath fromFSCommits: fsCommitsCollection withMappedPathPatterns: mappedPathPatternsCollection + ^ (mappedPathPatternsCollection anySatisfy: [:each | each matches: aPath]) or: [(self allHexHashesAt: aPath equalInFSCommits: fsCommitsCollection) not] \ No newline at end of file diff --git a/src/Squot.package/SquotMetadataMapper.class/methodProperties.json b/src/Squot.package/SquotMetadataMapper.class/methodProperties.json index 90ac319d8..26ea57622 100644 --- a/src/Squot.package/SquotMetadataMapper.class/methodProperties.json +++ b/src/Squot.package/SquotMetadataMapper.class/methodProperties.json @@ -36,9 +36,9 @@ "loadMetadataFromFSCommit:in:" : "mad 6/12/2024 13:59", "loadMetadataFromFileSystem:in:" : "mad 8/24/2024 17:04", "loadMetadataFromWorkingCopy:" : "mad 6/11/2024 18:37", - "loadMetadatasWithUntrackedMappersFromFSCommits:in:" : "mad 10/2/2024 18:37", + "loadMetadatasWithUntrackedMappersFromFSCommits:in:" : "mad 10/4/2024 15:50", "loadSquotContentsReferencesAndSerializersFromLegacySquotFileIn:" : "mad 10/4/2024 15:32", - "mappedPaths" : "mad 10/4/2024 16:04", + "mappedPathPatterns" : "mad 10/4/2024 15:33", "mappersChangeSetFromMappers:removing:changeSets:" : "mad 10/1/2024 14:39", "mergeCommit:into:withBase:" : "mad 2/20/2024 15:11", "mergeCommit:into:withBase:in:" : "mad 10/2/2024 20:05", @@ -50,6 +50,6 @@ "metadataFileReferenceIn:" : "mad 6/11/2024 18:33", "nameChangeSetFrom:to:" : "mad 9/27/2024 18:09", "printDescriptionOn:" : "mad 10/2/2024 20:13", - "shouldLoadUntrackedMappersAt:fromFSCommits:withMappedPaths:" : "mad 10/2/2024 17:08", + "shouldLoadUntrackedMappersAt:fromFSCommits:withMappedPathPatterns:" : "mad 10/4/2024 15:46", "untrackedMapperForReference:" : "mad 10/2/2024 16:59", "untrackedMapperForStream:" : "mad 10/2/2024 16:59" } } diff --git a/src/Squot.package/SquotPathPattern.class/README.md b/src/Squot.package/SquotPathPattern.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/Squot.package/SquotPathPattern.class/class/contains..st b/src/Squot.package/SquotPathPattern.class/class/contains..st new file mode 100644 index 000000000..90e89f4c3 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/class/contains..st @@ -0,0 +1,7 @@ +instance creation +contains: aPath + ^ self new + path: aPath; + allowLeading; + allowTrailing; + yourself \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/class/endsWith..st b/src/Squot.package/SquotPathPattern.class/class/endsWith..st new file mode 100644 index 000000000..16fdbe6a9 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/class/endsWith..st @@ -0,0 +1,7 @@ +instance creation +endsWith: aPath + ^ self new + path: aPath; + allowLeading; + disallowTrailing; + yourself \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/class/exactMatch..st b/src/Squot.package/SquotPathPattern.class/class/exactMatch..st new file mode 100644 index 000000000..5d43ce6d5 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/class/exactMatch..st @@ -0,0 +1,7 @@ +instance creation +exactMatch: aPath + ^ self new + path: aPath; + disallowLeading; + disallowTrailing; + yourself \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/class/startsWith..st b/src/Squot.package/SquotPathPattern.class/class/startsWith..st new file mode 100644 index 000000000..be3085178 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/class/startsWith..st @@ -0,0 +1,7 @@ +instance creation +startsWith: aPath + ^ self new + path: aPath; + disallowLeading; + allowTrailing; + yourself \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowLeading.st b/src/Squot.package/SquotPathPattern.class/instance/allowLeading.st new file mode 100644 index 000000000..1d19fe840 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowLeading.st @@ -0,0 +1,3 @@ +accessing +allowLeading + self allowsLeading: true. \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowTrailing.st b/src/Squot.package/SquotPathPattern.class/instance/allowTrailing.st new file mode 100644 index 000000000..f563ac1ad --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowTrailing.st @@ -0,0 +1,3 @@ +accessing +allowTrailing + self allowsTrailing: true. \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowsLeading..st b/src/Squot.package/SquotPathPattern.class/instance/allowsLeading..st new file mode 100644 index 000000000..b231c41fa --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowsLeading..st @@ -0,0 +1,3 @@ +accessing +allowsLeading: aBoolean + allowsLeading := aBoolean \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowsLeading.st b/src/Squot.package/SquotPathPattern.class/instance/allowsLeading.st new file mode 100644 index 000000000..595139fb6 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowsLeading.st @@ -0,0 +1,3 @@ +accessing +allowsLeading + ^ allowsLeading \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing..st b/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing..st new file mode 100644 index 000000000..e2733341e --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing..st @@ -0,0 +1,3 @@ +accessing +allowsTrailing: aBoolean + allowsTrailing := aBoolean \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing.st b/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing.st new file mode 100644 index 000000000..408b806db --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/allowsTrailing.st @@ -0,0 +1,3 @@ +accessing +allowsTrailing + ^ allowsTrailing \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/disallowLeading.st b/src/Squot.package/SquotPathPattern.class/instance/disallowLeading.st new file mode 100644 index 000000000..a63a5a68d --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/disallowLeading.st @@ -0,0 +1,3 @@ +accessing +disallowLeading + self allowsLeading: false. \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/disallowTrailing.st b/src/Squot.package/SquotPathPattern.class/instance/disallowTrailing.st new file mode 100644 index 000000000..833bb4843 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/disallowTrailing.st @@ -0,0 +1,3 @@ +accessing +disallowTrailing + self allowsTrailing: false. \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/matches..st b/src/Squot.package/SquotPathPattern.class/instance/matches..st new file mode 100644 index 000000000..cdceebdb0 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/matches..st @@ -0,0 +1,11 @@ +testing +matches: aPath + self path size = 0 ifTrue: [^ self allowsLeading or: [self allowsTrailing] or: [aPath size = 0]]. + aPath size < self path size ifTrue: [^ false]. + ^ self allowsLeading + ifFalse: [self matches: aPath startingAt: 1] + ifTrue: [ | lastMatchStart | + lastMatchStart := aPath size - self path size + 1. + self allowsTrailing + ifFalse: [self matches: aPath startingAt: lastMatchStart] + ifTrue: [(1 to: lastMatchStart) anySatisfy: [:index | self matches: aPath startingAt: index]]] \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/matches.startingAt..st b/src/Squot.package/SquotPathPattern.class/instance/matches.startingAt..st new file mode 100644 index 000000000..2a8b11aa3 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/matches.startingAt..st @@ -0,0 +1,9 @@ +testing +matches: aPath startingAt: aNumber + | matchEnd | + matchEnd := aNumber + self path size - 1. + aPath size < matchEnd ifTrue: [^ false]. + (self allowsTrailing not ==> [aPath size = matchEnd]) ifFalse: [^ false]. + aNumber to: matchEnd do: [:index | + (aPath at: index) = (self path at: index - aNumber + 1) ifFalse: [^ false]]. + ^ true \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/path..st b/src/Squot.package/SquotPathPattern.class/instance/path..st new file mode 100644 index 000000000..b09ea7c12 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/path..st @@ -0,0 +1,3 @@ +accessing +path: aPath + path := aPath \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/instance/path.st b/src/Squot.package/SquotPathPattern.class/instance/path.st new file mode 100644 index 000000000..0f90fd366 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/instance/path.st @@ -0,0 +1,3 @@ +accessing +path + ^ path \ No newline at end of file diff --git a/src/Squot.package/SquotPathPattern.class/methodProperties.json b/src/Squot.package/SquotPathPattern.class/methodProperties.json new file mode 100644 index 000000000..1621539b6 --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/methodProperties.json @@ -0,0 +1,19 @@ +{ + "class" : { + "contains:" : "mad 10/4/2024 15:28", + "endsWith:" : "mad 10/4/2024 15:28", + "exactMatch:" : "mad 10/4/2024 15:10", + "startsWith:" : "mad 10/4/2024 15:28" }, + "instance" : { + "allowLeading" : "mad 10/4/2024 15:24", + "allowTrailing" : "mad 10/4/2024 15:25", + "allowsLeading" : "mad 10/4/2024 15:24", + "allowsLeading:" : "mad 10/4/2024 15:25", + "allowsTrailing" : "mad 10/4/2024 15:24", + "allowsTrailing:" : "mad 10/4/2024 15:25", + "disallowLeading" : "mad 10/4/2024 15:25", + "disallowTrailing" : "mad 10/4/2024 15:25", + "matches:" : "mad 10/4/2024 15:42", + "matches:startingAt:" : "mad 10/4/2024 15:43", + "path" : "mad 10/4/2024 15:10", + "path:" : "mad 10/4/2024 15:10" } } diff --git a/src/Squot.package/SquotPathPattern.class/properties.json b/src/Squot.package/SquotPathPattern.class/properties.json new file mode 100644 index 000000000..1277fe6dc --- /dev/null +++ b/src/Squot.package/SquotPathPattern.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Squot-Mapper-Utilities", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "path", + "allowsLeading", + "allowsTrailing" ], + "name" : "SquotPathPattern", + "pools" : [ + ], + "super" : "Object", + "type" : "normal" } diff --git a/src/Squot.package/SquotPathUtilities.class/class/path.collidesWith..st b/src/Squot.package/SquotPathUtilities.class/class/path.collidesWith..st deleted file mode 100644 index aba905484..000000000 --- a/src/Squot.package/SquotPathUtilities.class/class/path.collidesWith..st +++ /dev/null @@ -1,5 +0,0 @@ -testing -path: aPath collidesWith: anotherPath - 1 to: (aPath size min: anotherPath size) do: [:index | - (aPath at: index) = (anotherPath at: index) ifFalse: [^ false]]. - ^ true \ No newline at end of file diff --git a/src/Squot.package/SquotPathUtilities.class/class/path.collidesWithAnyOf..st b/src/Squot.package/SquotPathUtilities.class/class/path.collidesWithAnyOf..st deleted file mode 100644 index 84959f686..000000000 --- a/src/Squot.package/SquotPathUtilities.class/class/path.collidesWithAnyOf..st +++ /dev/null @@ -1,3 +0,0 @@ -testing -path: aPath collidesWithAnyOf: aCollection - ^ aCollection anySatisfy: [:each | self path: aPath collidesWith: each] \ No newline at end of file diff --git a/src/Squot.package/SquotPathUtilities.class/class/path.containsOrEquals..st b/src/Squot.package/SquotPathUtilities.class/class/path.containsOrEquals..st deleted file mode 100644 index 1c949db9f..000000000 --- a/src/Squot.package/SquotPathUtilities.class/class/path.containsOrEquals..st +++ /dev/null @@ -1,6 +0,0 @@ -testing -path: aPath containsOrEquals: anotherPath - aPath size <= anotherPath size ifFalse: [^ false]. - 1 to: aPath size do: [:index | - (aPath at: index) = (anotherPath at: index) ifFalse: [^ false]]. - ^ true \ No newline at end of file diff --git a/src/Squot.package/SquotPathUtilities.class/methodProperties.json b/src/Squot.package/SquotPathUtilities.class/methodProperties.json index e05036519..a531c7376 100644 --- a/src/Squot.package/SquotPathUtilities.class/methodProperties.json +++ b/src/Squot.package/SquotPathUtilities.class/methodProperties.json @@ -9,9 +9,6 @@ "fromString:" : "mad 11/21/2023 14:34", "mainDelimiter" : "mad 11/21/2023 15:02", "otherDelimiters" : "mad 11/21/2023 14:03", - "path:collidesWith:" : "mad 10/21/2023 23:04", - "path:collidesWithAnyOf:" : "mad 10/2/2024 17:07", - "path:containsOrEquals:" : "mad 10/21/2023 23:56", "requestAbsolute:initialAnswer:" : "mad 11/21/2023 14:32", "resolve:withRootAt:" : "mad 6/16/2024 21:49", "toAbsolutePath:" : "mad 11/21/2023 14:34" }, diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/isUnmapped..st b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/isUnmapped..st index 82145181c..b722d9b6d 100644 --- a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/isUnmapped..st +++ b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/isUnmapped..st @@ -1,4 +1,3 @@ accessing isUnmapped: aPath - ^ self mappedPaths noneSatisfy: [:each | - SquotPathUtilities path: each containsOrEquals: aPath] \ No newline at end of file + ^ self mappedPathPatterns noneSatisfy: [:each | each matches: aPath] \ No newline at end of file diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns..st b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns..st new file mode 100644 index 000000000..31bc9cb55 --- /dev/null +++ b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns..st @@ -0,0 +1,3 @@ +accessing +mappedPathPatterns: aCollection + mappedPathPatterns := aCollection \ No newline at end of file diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns.st b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns.st new file mode 100644 index 000000000..662815736 --- /dev/null +++ b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns.st @@ -0,0 +1,3 @@ +accessing +mappedPathPatterns + ^ mappedPathPatterns \ No newline at end of file diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths..st b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths..st deleted file mode 100644 index 17e774674..000000000 --- a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -mappedPaths: aCollection - mappedPaths := aCollection \ No newline at end of file diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths.st b/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths.st deleted file mode 100644 index 5fcff61f1..000000000 --- a/src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -mappedPaths - ^ mappedPaths \ No newline at end of file diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/methodProperties.json b/src/Squot.package/SquotUnmappedReferencesVisitor.class/methodProperties.json index fcf3da3d6..fe0928f4d 100644 --- a/src/Squot.package/SquotUnmappedReferencesVisitor.class/methodProperties.json +++ b/src/Squot.package/SquotUnmappedReferencesVisitor.class/methodProperties.json @@ -4,7 +4,7 @@ "instance" : { "block" : "mad 10/21/2023 23:30", "block:" : "mad 10/21/2023 23:30", - "isUnmapped:" : "mad 10/21/2023 23:56", - "mappedPaths" : "mad 10/21/2023 23:30", - "mappedPaths:" : "mad 10/21/2023 23:31", + "isUnmapped:" : "mad 10/4/2024 15:34", + "mappedPathPatterns" : "mad 10/4/2024 15:34", + "mappedPathPatterns:" : "mad 10/4/2024 15:34", "show:" : "mad 10/21/2023 23:36" } } diff --git a/src/Squot.package/SquotUnmappedReferencesVisitor.class/properties.json b/src/Squot.package/SquotUnmappedReferencesVisitor.class/properties.json index ef7380943..f4671777d 100644 --- a/src/Squot.package/SquotUnmappedReferencesVisitor.class/properties.json +++ b/src/Squot.package/SquotUnmappedReferencesVisitor.class/properties.json @@ -6,7 +6,7 @@ ], "commentStamp" : "", "instvars" : [ - "mappedPaths", + "mappedPathPatterns", "block" ], "name" : "SquotUnmappedReferencesVisitor", "pools" : [