-
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.
Treat all metadata-related files as mapped
* Fix metadata files being treated as untracked files * Add SquotPathPattern to match .squot-contents files
- Loading branch information
Showing
51 changed files
with
165 additions
and
61 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SqueakWorkingCopy.class/instance/mappedPathPatterns.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 @@ | ||
paths | ||
mappedPathPatterns | ||
^ self allMappers gather: #mappedPathPatterns |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SqueakWorkingCopy.class/instance/mappedPaths.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..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,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] |
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SqueakWorkingCopy.class/instance/unmappedReferencesIn.do..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,6 +1,6 @@ | ||
paths | ||
unmappedReferencesIn: anFSCommit do: aBlock | ||
SquotUnmappedReferencesVisitor new | ||
mappedPaths: self mappedPaths; | ||
mappedPathPatterns: self mappedPathPatterns; | ||
block: aBlock; | ||
show: anFSCommit filesystem root. |
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/SquotAssetMapper.class/instance/mappedPathPatterns.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 | ||
mappedPathPatterns | ||
^ {SquotPathPattern exactMatch: self path} |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotAssetMapper.class/instance/mappedPaths.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
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/mappedPathPatterns.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 | ||
mappedPathPatterns | ||
^ {SquotPathPattern startsWith: self packagePath} |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/mappedPaths.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
2 changes: 1 addition & 1 deletion
2
...SquotMapper.class/instance/mappedPaths.st → ...pper.class/instance/mappedPathPatterns.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 | ||
mappedPathPatterns | ||
self subclassResponsibility. |
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/SquotMetadata.class/instance/mappedPathPatterns.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 | ||
mappedPathPatterns | ||
^ (self trackedMappers copyWith: SquotMetadataMapper new) gather: #mappedPathPatterns |
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SquotMetadata.class/instance/unmappedReferencesIn.do..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,6 +1,6 @@ | ||
untracked-mappers | ||
unmappedReferencesIn: aFileSystem do: aBlock | ||
SquotUnmappedReferencesVisitor new | ||
mappedPaths: (self trackedMappers gather: #mappedPaths); | ||
mappedPathPatterns: self mappedPathPatterns; | ||
block: aBlock; | ||
show: aFileSystem root |
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
8 changes: 8 additions & 0 deletions
8
src/Squot.package/SquotMetadataMapper.class/instance/mappedPathPatterns.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,8 @@ | ||
accessing | ||
mappedPathPatterns | ||
^ { | ||
SquotPathPattern exactMatch: self metadataFilePath. | ||
SquotPathPattern exactMatch: self legacyMappersFilePath. | ||
SquotPathPattern exactMatch: self legacySquotFilePath. | ||
SquotPathPattern endsWith: {self legacySquotContentsFileBaseName}. | ||
} |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotMetadataMapper.class/instance/mappedPaths.st
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...ppersAt.fromFSCommits.withMappedPaths..st → ....fromFSCommits.withMappedPathPatterns..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,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] |
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
Empty file.
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,7 @@ | ||
instance creation | ||
contains: aPath | ||
^ self new | ||
path: aPath; | ||
allowLeading; | ||
allowTrailing; | ||
yourself |
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,7 @@ | ||
instance creation | ||
endsWith: aPath | ||
^ self new | ||
path: aPath; | ||
allowLeading; | ||
disallowTrailing; | ||
yourself |
7 changes: 7 additions & 0 deletions
7
src/Squot.package/SquotPathPattern.class/class/exactMatch..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,7 @@ | ||
instance creation | ||
exactMatch: aPath | ||
^ self new | ||
path: aPath; | ||
disallowLeading; | ||
disallowTrailing; | ||
yourself |
7 changes: 7 additions & 0 deletions
7
src/Squot.package/SquotPathPattern.class/class/startsWith..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,7 @@ | ||
instance creation | ||
startsWith: aPath | ||
^ self new | ||
path: aPath; | ||
disallowLeading; | ||
allowTrailing; | ||
yourself |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowLeading.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 | ||
allowLeading | ||
self allowsLeading: true. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowTrailing.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 | ||
allowTrailing | ||
self allowsTrailing: true. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowsLeading..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 | ||
allowsLeading: aBoolean | ||
allowsLeading := aBoolean |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowsLeading.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 | ||
allowsLeading | ||
^ allowsLeading |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowsTrailing..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 | ||
allowsTrailing: aBoolean | ||
allowsTrailing := aBoolean |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/allowsTrailing.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 | ||
allowsTrailing | ||
^ allowsTrailing |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/disallowLeading.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 | ||
disallowLeading | ||
self allowsLeading: false. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotPathPattern.class/instance/disallowTrailing.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 | ||
disallowTrailing | ||
self allowsTrailing: false. |
11 changes: 11 additions & 0 deletions
11
src/Squot.package/SquotPathPattern.class/instance/matches..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,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]]] |
9 changes: 9 additions & 0 deletions
9
src/Squot.package/SquotPathPattern.class/instance/matches.startingAt..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 @@ | ||
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 |
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 | ||
path: aPath | ||
path := aPath |
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 | ||
path | ||
^ path |
19 changes: 19 additions & 0 deletions
19
src/Squot.package/SquotPathPattern.class/methodProperties.json
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,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" } } |
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,16 @@ | ||
{ | ||
"category" : "Squot-Mapper-Utilities", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"path", | ||
"allowsLeading", | ||
"allowsTrailing" ], | ||
"name" : "SquotPathPattern", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
5 changes: 0 additions & 5 deletions
5
src/Squot.package/SquotPathUtilities.class/class/path.collidesWith..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotPathUtilities.class/class/path.collidesWithAnyOf..st
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/Squot.package/SquotPathUtilities.class/class/path.containsOrEquals..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
3 changes: 1 addition & 2 deletions
3
src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/isUnmapped..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,4 +1,3 @@ | ||
accessing | ||
isUnmapped: aPath | ||
^ self mappedPaths noneSatisfy: [:each | | ||
SquotPathUtilities path: each containsOrEquals: aPath] | ||
^ self mappedPathPatterns noneSatisfy: [:each | each matches: aPath] |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns..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 | ||
mappedPathPatterns: aCollection | ||
mappedPathPatterns := aCollection |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPathPatterns.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 | ||
mappedPathPatterns | ||
^ mappedPathPatterns |
3 changes: 0 additions & 3 deletions
3
src/Squot.package/SquotUnmappedReferencesVisitor.class/instance/mappedPaths..st
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.