From 174f2469e302d5896fbaf92991767c870e255d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20D=C3=B6rbandt?= Date: Sun, 16 Jun 2024 22:26:42 +0200 Subject: [PATCH] Also scan MCDirectoryRepositories for local repositories --- .../class/scanFor.ifAbsent..st | 4 +--- .../instance/directory.st | 4 +--- .../methodProperties.json | 4 ++-- .../instance/squotDirectoryForProjectNamed..st | 8 ++++++++ .../MCDirectoryRepository.extension/methodProperties.json | 5 +++++ .../MCDirectoryRepository.extension/properties.json | 2 ++ .../instance/squotDirectoryForProjectNamed..st | 6 ++++++ .../methodProperties.json | 5 +++++ .../properties.json | 2 ++ .../instance/squotDirectoryForProjectNamed..st | 3 +++ .../MCRepository.extension/methodProperties.json | 5 +++++ src/Squot.package/MCRepository.extension/properties.json | 2 ++ 12 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 src/Squot.package/MCDirectoryRepository.extension/instance/squotDirectoryForProjectNamed..st create mode 100644 src/Squot.package/MCDirectoryRepository.extension/methodProperties.json create mode 100644 src/Squot.package/MCDirectoryRepository.extension/properties.json create mode 100644 src/Squot.package/MCFilesystemFetchOnlyRepository.extension/instance/squotDirectoryForProjectNamed..st create mode 100644 src/Squot.package/MCFilesystemFetchOnlyRepository.extension/methodProperties.json create mode 100644 src/Squot.package/MCFilesystemFetchOnlyRepository.extension/properties.json create mode 100644 src/Squot.package/MCRepository.extension/instance/squotDirectoryForProjectNamed..st create mode 100644 src/Squot.package/MCRepository.extension/methodProperties.json create mode 100644 src/Squot.package/MCRepository.extension/properties.json diff --git a/src/Squot.package/GitMCRepositoryAssetLoader.class/class/scanFor.ifAbsent..st b/src/Squot.package/GitMCRepositoryAssetLoader.class/class/scanFor.ifAbsent..st index 312fff786..be905923b 100644 --- a/src/Squot.package/GitMCRepositoryAssetLoader.class/class/scanFor.ifAbsent..st +++ b/src/Squot.package/GitMCRepositoryAssetLoader.class/class/scanFor.ifAbsent..st @@ -2,8 +2,6 @@ as yet unclassified scanFor: aString ifAbsent: aBlock | repository | repository := MCRepositoryGroup default repositories - detect: [:each | - (each isKindOf: MCFilesystemFetchOnlyRepository) - and: [each projectPath endsWith: '/', aString]] + detect: [:each | (each squotDirectoryForProjectNamed: aString) notNil] ifNone: [^ aBlock value]. ^ self newWithName: aString on: repository \ No newline at end of file diff --git a/src/Squot.package/GitMCRepositoryAssetLoader.class/instance/directory.st b/src/Squot.package/GitMCRepositoryAssetLoader.class/instance/directory.st index e874dfc17..2d4dbfab5 100644 --- a/src/Squot.package/GitMCRepositoryAssetLoader.class/instance/directory.st +++ b/src/Squot.package/GitMCRepositoryAssetLoader.class/instance/directory.st @@ -1,6 +1,4 @@ accessing directory - self directory: (self repository - projectDirectoryFrom: self repository projectPath - version: self repository projectVersion) asFSReference. + self directory: (self repository squotDirectoryForProjectNamed: self name). ^ super directory \ No newline at end of file diff --git a/src/Squot.package/GitMCRepositoryAssetLoader.class/methodProperties.json b/src/Squot.package/GitMCRepositoryAssetLoader.class/methodProperties.json index e00baf224..3d63cb0e3 100644 --- a/src/Squot.package/GitMCRepositoryAssetLoader.class/methodProperties.json +++ b/src/Squot.package/GitMCRepositoryAssetLoader.class/methodProperties.json @@ -1,8 +1,8 @@ { "class" : { "newWithName:on:" : "mad 6/12/2024 15:49", - "scanFor:ifAbsent:" : "mad 6/12/2024 15:49" }, + "scanFor:ifAbsent:" : "mad 6/16/2024 21:58" }, "instance" : { - "directory" : "mad 6/12/2024 16:03", + "directory" : "mad 6/16/2024 21:58", "repository" : "mad 6/12/2024 15:53", "repository:" : "mad 6/12/2024 15:53" } } diff --git a/src/Squot.package/MCDirectoryRepository.extension/instance/squotDirectoryForProjectNamed..st b/src/Squot.package/MCDirectoryRepository.extension/instance/squotDirectoryForProjectNamed..st new file mode 100644 index 000000000..a2acb646c --- /dev/null +++ b/src/Squot.package/MCDirectoryRepository.extension/instance/squotDirectoryForProjectNamed..st @@ -0,0 +1,8 @@ +*Squot-Mapper-Assets +squotDirectoryForProjectNamed: aString + | reference | + reference := SquotPathUtilities ancestorOf: self directory asFSReference that: [:ancestor | + (SquotPathUtilities resolve: SquotMappersMapper path withRootAt: ancestor) exists]. + ^ (reference ifNil: [^ nil]) basename = aString + ifTrue: [reference] + ifFalse: [nil] \ No newline at end of file diff --git a/src/Squot.package/MCDirectoryRepository.extension/methodProperties.json b/src/Squot.package/MCDirectoryRepository.extension/methodProperties.json new file mode 100644 index 000000000..5eb6dec4f --- /dev/null +++ b/src/Squot.package/MCDirectoryRepository.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "squotDirectoryForProjectNamed:" : "mad 6/16/2024 22:00" } } diff --git a/src/Squot.package/MCDirectoryRepository.extension/properties.json b/src/Squot.package/MCDirectoryRepository.extension/properties.json new file mode 100644 index 000000000..653033fbc --- /dev/null +++ b/src/Squot.package/MCDirectoryRepository.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "MCDirectoryRepository" } diff --git a/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/instance/squotDirectoryForProjectNamed..st b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/instance/squotDirectoryForProjectNamed..st new file mode 100644 index 000000000..f4caa97cc --- /dev/null +++ b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/instance/squotDirectoryForProjectNamed..st @@ -0,0 +1,6 @@ +*Squot-Mapper-Assets +squotDirectoryForProjectNamed: aString + (self projectPath endsWith: '/', aString) ifFalse: [^ nil]. + ^ (self + projectDirectoryFrom: self projectPath + version: self projectVersion) asFSReference \ No newline at end of file diff --git a/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/methodProperties.json b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/methodProperties.json new file mode 100644 index 000000000..02967003a --- /dev/null +++ b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "squotDirectoryForProjectNamed:" : "mad 6/16/2024 21:57" } } diff --git a/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/properties.json b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/properties.json new file mode 100644 index 000000000..9a8e643e1 --- /dev/null +++ b/src/Squot.package/MCFilesystemFetchOnlyRepository.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "MCFilesystemFetchOnlyRepository" } diff --git a/src/Squot.package/MCRepository.extension/instance/squotDirectoryForProjectNamed..st b/src/Squot.package/MCRepository.extension/instance/squotDirectoryForProjectNamed..st new file mode 100644 index 000000000..d2e98c5e5 --- /dev/null +++ b/src/Squot.package/MCRepository.extension/instance/squotDirectoryForProjectNamed..st @@ -0,0 +1,3 @@ +*Squot-Mapper-Assets +squotDirectoryForProjectNamed: aString + ^ nil \ No newline at end of file diff --git a/src/Squot.package/MCRepository.extension/methodProperties.json b/src/Squot.package/MCRepository.extension/methodProperties.json new file mode 100644 index 000000000..9d0a2a4e0 --- /dev/null +++ b/src/Squot.package/MCRepository.extension/methodProperties.json @@ -0,0 +1,5 @@ +{ + "class" : { + }, + "instance" : { + "squotDirectoryForProjectNamed:" : "mad 6/16/2024 21:43" } } diff --git a/src/Squot.package/MCRepository.extension/properties.json b/src/Squot.package/MCRepository.extension/properties.json new file mode 100644 index 000000000..77996dbf0 --- /dev/null +++ b/src/Squot.package/MCRepository.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "MCRepository" }