Getting information for repository files.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-04-17 20:51:54 -05:00
parent a424c855fc
commit 49e2cf7d29
1 changed files with 22 additions and 2 deletions

View File

@ -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')