Creating url for versioned markdeep files, improving list parsing and remote repo.

This commit is contained in:
ruidajo 2022-03-29 21:34:47 -05:00
parent 64576a1a8c
commit c92f335928

View File

@ -333,7 +333,25 @@ FossilRepo >> lastVersionPath: aFileNameWithRelativePath [
{ #category : #accessing } { #category : #accessing }
FossilRepo >> list [ FossilRepo >> list [
^ (self command: 'ls') lines
| lines output markdeepFiles otherFiles |
output := OrderedDictionary new.
lines := (self command: 'ls') lines.
markdeepFiles := lines select: [ :line | line endsWith: '.md.html' ].
otherFiles := lines reject: [ :line | line endsWith: '.md.html'].
output
at: 'markdeep files'
put: {'file reference' -> markdeepFiles .
'url' -> (markdeepFiles collect: [ :ref |
('https://', ((self remote splitOn: '@' )
at: 2), '/doc/trunk/', ref)asUrl ])
} asDictionary.
output
at: 'other files'
put: otherFiles.
^ output
] ]
{ #category : #accessing } { #category : #accessing }
@ -407,7 +425,8 @@ FossilRepo >> rawCapabilities [
{ #category : #accessing } { #category : #accessing }
FossilRepo >> remote [ FossilRepo >> remote [
^ remote
^ remote := (self command: 'remote') copyWithout: Character lf
] ]
{ #category : #accessing } { #category : #accessing }