diff --git a/repository/Fossil/FossilRepo.class.st b/repository/Fossil/FossilRepo.class.st index 5e09989..4fd5fdb 100644 --- a/repository/Fossil/FossilRepo.class.st +++ b/repository/Fossil/FossilRepo.class.st @@ -35,11 +35,15 @@ FossilRepo class >> executable: aPathString [ { #category : #'instance creation' } FossilRepo class >> local: aFilePath repository: aFossilFilePath [ - - ^ self new + + | repo | + repo := self new local: aFilePath; - repository: aFossilFilePath; - yourself + repository: aFossilFilePath. + repo remote = 'off' + ifTrue: [ repo remote: nil ] + ifFalse: [ repo remote: repo remote ]. + ^ repo ] { #category : #accessing } @@ -169,6 +173,19 @@ FossilRepo >> createPage: pageName [ ^ NeoJSONReader fromString: (self jsonWikiDataFor: 'create/', pageName) ] +{ #category : #accessing } +FossilRepo >> delete: fileRelativePath [ + "I delete a file to the working Fossil repository, given that both, the file and the repositor, + share the same root directory/folder." + + OSSUnixSubprocess new + command: self class locateExecutable; + workingDirectory: self localRoot; + arguments: { 'delete' . fileRelativePath }; + redirectStdout; + runAndWaitOnExitDo: [ :process :outString | ^ outString ] +] + { #category : #accessing } FossilRepo >> diff [ @@ -437,7 +454,11 @@ FossilRepo >> remote [ { #category : #accessing } FossilRepo >> remote: anUrlString [ - remote := anUrlString asUrl + + anUrlString + ifNil: [ remote := anUrlString ] + ifNotNil: [ remote := anUrlString asUrl ] + ] { #category : #accessing }