Creating delete files and improving instance creation and remote.

This commit is contained in:
ruidajo 2022-12-12 10:39:38 -05:00
parent ec04597451
commit 5b92b14500

View File

@ -36,10 +36,14 @@ 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 }