Improving names of unversioned management methods.

This commit is contained in:
ruidajo 2022-03-11 01:12:55 -05:00
parent 584bd2403f
commit fd35ce21fc

View File

@ -88,6 +88,26 @@ FossilRepo >> addRecentChangesFromWiki: aTiddlywiki [
^ self status ^ self status
] ]
{ #category : #accessing }
FossilRepo >> addUnversioned: aFileRelativePathFullname [
^ self fossilUv: 'add' and: aFileRelativePathFullname
]
{ #category : #accessing }
FossilRepo >> addUnversionedLargeTiddlersFromWiki: tiddlywiki [
| stonfiles largeTiddlersFileReference |
stonfiles := (tiddlywiki file parent / 'largeTiddlers') files
select: [ :each | each fullName endsWith: '.ston' ].
largeTiddlersFileReference := stonfiles collect: [ :each |
each fullName withoutPrefix:
self local fullName , '/' ].
largeTiddlersFileReference do: [ :each | self addUnversioned: each ].
^ largeTiddlersFileReference
]
{ #category : #authentication } { #category : #authentication }
FossilRepo >> authTokenFor: anUserName withPassword: passwordString [ FossilRepo >> authTokenFor: anUserName withPassword: passwordString [
^ ((self loginAs: anUserName withPassword: passwordString) at: 'payload') at: 'authToken' ^ ((self loginAs: anUserName withPassword: passwordString) at: 'payload') at: 'authToken'
@ -184,6 +204,28 @@ FossilRepo >> diff [
^ self command: 'diff' ^ self command: 'diff'
] ]
{ #category : #accessing }
FossilRepo >> exportSTONUnversioned [
| stonFileReferenceFullName |
stonFileReferenceFullName := (self listUnversioned)
select: [ :each | each endsWith: '.ston' ].
stonFileReferenceFullName do: [ :each | self exportUnversioned: each ].
^ stonFileReferenceFullName
]
{ #category : #accessing }
FossilRepo >> exportUnversioned: fileReferenceFullName [
OSSUnixSubprocess new
command: 'fossil';
arguments: { 'uv' . 'export' . fileReferenceFullName . fileReferenceFullName };
workingDirectory: self localRoot;
redirectStdout;
redirectStderr;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> extra [ FossilRepo >> extra [
@ -430,6 +472,13 @@ FossilRepo >> status [
^ output ^ output
] ]
{ #category : #accessing }
FossilRepo >> syncUnversioned [
^ self fossilUv: 'sync' and: '-v'
]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> update [ FossilRepo >> update [
@ -439,58 +488,10 @@ FossilRepo >> update [
{ #category : #accessing } { #category : #accessing }
FossilRepo >> updateAndRebuildTiddlersJSONFromWiki: aTiddlywiki [ FossilRepo >> updateAndRebuildTiddlersJSONFromWiki: aTiddlywiki [
self update; uvExportSTON. self update; exportSTONUnversioned.
^ aTiddlywiki rebuildTiddlersJSON. ^ aTiddlywiki rebuildTiddlersJSON.
] ]
{ #category : #accessing }
FossilRepo >> uvAdd: aFileRelativePathFullname [
^ self fossilUv: 'add' and: aFileRelativePathFullname
]
{ #category : #accessing }
FossilRepo >> uvAddLargeTiddlersFromWiki: aTiddlywiki [
| stonfiles largeTiddlersFileReference |
stonfiles := (aTiddlywiki file parent / 'largeTiddlers') files
select: [ :each | each fullName endsWith: '.ston' ].
largeTiddlersFileReference := stonfiles
collect: [ :each | each fullName withoutPrefix: (self local fullName, '/') ].
largeTiddlersFileReference do: [ :each | self uvAdd: each ].
^ largeTiddlersFileReference
]
{ #category : #accessing }
FossilRepo >> uvExport: fileReferenceFullName [
OSSUnixSubprocess new
command: 'fossil';
arguments: { 'uv' . 'export' . fileReferenceFullName . fileReferenceFullName };
workingDirectory: self localRoot;
redirectStdout;
redirectStderr;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
]
{ #category : #accessing }
FossilRepo >> uvExportSTON [
| stonFileReferenceFullName |
stonFileReferenceFullName := (self listUnversioned)
select: [ :each | each endsWith: '.ston' ].
stonFileReferenceFullName do: [ :each | self uvExport: each ].
^ stonFileReferenceFullName
]
{ #category : #accessing }
FossilRepo >> uvSync [
^ self fossilUv: 'sync' and: '-v'
]
{ #category : #authentication } { #category : #authentication }
FossilRepo >> whoAmI [ FossilRepo >> whoAmI [
^ NeoJSONReader fromString: (self jsonDataFor: 'whoami') ^ NeoJSONReader fromString: (self jsonDataFor: 'whoami')