From 47b39df9caaa700b4170bb228baff4b88318d0c5 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 17 Jan 2020 12:57:06 +0000 Subject: [PATCH] Adding files support. --- repository/Fossil/FossilRepo.class.st | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/repository/Fossil/FossilRepo.class.st b/repository/Fossil/FossilRepo.class.st index cf4ed08..29b68db 100644 --- a/repository/Fossil/FossilRepo.class.st +++ b/repository/Fossil/FossilRepo.class.st @@ -19,14 +19,16 @@ Class { } { #category : #'as yet unclassified' } -FossilRepo >> add: aFileReference [ +FossilRepo >> add: fileRelativePath [ + "I add a file to the working Fossil repository, given that both, the file and the repositor, + share the same root directory/folder." + OSSUnixSubprocess new command: '/usr/bin/fossil'; - arguments: { 'add' . aFileReference fullName }; + arguments: { 'add' . fileRelativePath }; + workingDirectory: self localFolderName; redirectStdout; - runAndWaitOnExitDo: [ :process :outString | - outString inspect - ] + runAndWaitOnExitDo: [ :process :outString | ^ outString ] ] { #category : #authentication } @@ -158,6 +160,11 @@ FossilRepo >> local: aLocalFilePath [ local := aLocalFilePath ] +{ #category : #'as yet unclassified' } +FossilRepo >> localFolderName [ + ^ self local parent fullName +] + { #category : #authentication } FossilRepo >> loginAs: anUserName withPassword: password [ | jsonData | @@ -208,15 +215,13 @@ FossilRepo >> sanitize: aFileNameWithRelativePath [ { #category : #'as yet unclassified' } FossilRepo >> status [ - OSSUnixSubprocess new + OSSUnixSubprocess new command: '/usr/bin/fossil'; arguments: #('status'); - workingDirectory: self local parent fullName; + workingDirectory: self localFolderName; redirectStdout; redirectStderr; - runAndWaitOnExitDo: [ :process :outString | - ^ outString - ] + runAndWaitOnExitDo: [ :process :outString | ^ outString ] ] { #category : #authentication }