diff --git a/repository/Fossil/FossilRepo.class.st b/repository/Fossil/FossilRepo.class.st index 4fd5fdb..39e2293 100644 --- a/repository/Fossil/FossilRepo.class.st +++ b/repository/Fossil/FossilRepo.class.st @@ -235,6 +235,12 @@ FossilRepo >> fetchPage: pageName [ ^ NeoJSONReader fromString: (self jsonWikiDataFor: 'get/', pageName) ] +{ #category : #accessing } +FossilRepo >> firstCheckinFor: testRepoFile [ + "Checkins are in reverse order" + ^ (self checkinsFor: testRepoFile) last +] + { #category : #accessing } FossilRepo >> fossilUv: anArgument and: aSecondArgument [ @@ -318,7 +324,7 @@ FossilRepo >> jsonDataFor: anUrlSegment [ { #category : #querying } FossilRepo >> jsonStringFor: aFileName [ | baseUrl queryForJSONData | - baseUrl := self remote addPathSegments: #('json' 'finfo'). + baseUrl := self remote copy addPathSegments: #('json' 'finfo'). queryForJSONData := baseUrl queryAt: 'name' put: aFileName. ^ (ZnEasy get: queryForJSONData) contents. ] @@ -441,6 +447,13 @@ FossilRepo >> pageList [ ^ NeoJSONReader fromString: (self jsonWikiDataFor: 'list') ] +{ #category : #accessing } +FossilRepo >> printOn: aStream [ + super initialize. + aStream + nextPutAll: 'Repository: ', self remote asString +] + { #category : #authentication } FossilRepo >> rawCapabilities [ ^ NeoJSONReader fromString: (self jsonDataFor: 'cap') @@ -449,7 +462,9 @@ FossilRepo >> rawCapabilities [ { #category : #accessing } FossilRepo >> remote [ - ^ remote := (self command: 'remote') copyWithout: Character lf + ^ remote + "TO DEBUG: Capture the context of this assignation without damaging the generaly of the accessor for other cases." + ":= (self command: 'remote') copyWithout: Character lf" ] { #category : #accessing } @@ -582,6 +597,11 @@ FossilRepo >> update [ ^ self command: 'update' ] +{ #category : #accessing } +FossilRepo >> uuidFor: relativeFilePath [ + ^ (self firstCheckinFor: relativeFilePath) at: 'uuid' +] + { #category : #authentication } FossilRepo >> whoAmI [ ^ NeoJSONReader fromString: (self jsonDataFor: 'whoami')