From c92f33592827544d8585f9c721c6b5b1fd4179c5 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Tue, 29 Mar 2022 21:34:47 -0500 Subject: [PATCH] Creating url for versioned markdeep files, improving list parsing and remote repo. --- repository/Fossil/FossilRepo.class.st | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/repository/Fossil/FossilRepo.class.st b/repository/Fossil/FossilRepo.class.st index 4a581ff..077e087 100644 --- a/repository/Fossil/FossilRepo.class.st +++ b/repository/Fossil/FossilRepo.class.st @@ -333,7 +333,25 @@ FossilRepo >> lastVersionPath: aFileNameWithRelativePath [ { #category : #accessing } 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 } @@ -407,7 +425,8 @@ FossilRepo >> rawCapabilities [ { #category : #accessing } FossilRepo >> remote [ - ^ remote + + ^ remote := (self command: 'remote') copyWithout: Character lf ] { #category : #accessing }