Creatings testing, refactoring unversioned management and improving instance creation.
This commit is contained in:
parent
bfba0fe43d
commit
c45692465d
@ -14,8 +14,7 @@ Class {
|
|||||||
#instVars : [
|
#instVars : [
|
||||||
'local',
|
'local',
|
||||||
'remote',
|
'remote',
|
||||||
'repository',
|
'repository'
|
||||||
'tiddlywiki'
|
|
||||||
],
|
],
|
||||||
#classInstVars : [
|
#classInstVars : [
|
||||||
'executable'
|
'executable'
|
||||||
@ -257,6 +256,13 @@ FossilRepo >> init: absolutePathString [
|
|||||||
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
|
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #testing }
|
||||||
|
FossilRepo >> isOpen [
|
||||||
|
|
||||||
|
self status ifEmpty: [ ^ false ].
|
||||||
|
^ true
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #utilities }
|
{ #category : #utilities }
|
||||||
FossilRepo >> isUnversioned: aFileNameWithRelativePath [
|
FossilRepo >> isUnversioned: aFileNameWithRelativePath [
|
||||||
|
|
||||||
@ -302,6 +308,12 @@ FossilRepo >> lastVersionPath: aFileNameWithRelativePath [
|
|||||||
ifFalse: [ ^ '/doc/tip/', aFileNameWithRelativePath ]
|
ifFalse: [ ^ '/doc/tip/', aFileNameWithRelativePath ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
FossilRepo >> listUnversioned [
|
||||||
|
|
||||||
|
^ (self fossilUv: 'ls' and: '') lines
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
FossilRepo >> local [
|
FossilRepo >> local [
|
||||||
^ local
|
^ local
|
||||||
@ -378,13 +390,17 @@ FossilRepo >> remote: anUrlString [
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
FossilRepo >> repository [
|
FossilRepo >> repository [
|
||||||
|
|
||||||
^ repository
|
repository ifNotNil: [ ^ repository ].
|
||||||
|
self isOpen ifFalse: [ ^ nil ].
|
||||||
|
^ repository := ((self status lines detect:
|
||||||
|
[ :line | line beginsWith: 'repository:' ])
|
||||||
|
splitOn: ':') second trimmed.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
FossilRepo >> repository: aFossilRepoFile [
|
FossilRepo >> repository: aFossilRepoFile [
|
||||||
|
|
||||||
repository := aFossilRepoFile fullName
|
repository := aFossilRepoFile "fullName"
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #utilities }
|
{ #category : #utilities }
|
||||||
@ -451,18 +467,12 @@ FossilRepo >> uvExport: fileReferenceFullName [
|
|||||||
FossilRepo >> uvExportSTON [
|
FossilRepo >> uvExportSTON [
|
||||||
|
|
||||||
| stonFileReferenceFullName |
|
| stonFileReferenceFullName |
|
||||||
stonFileReferenceFullName := (self uvLs lines)
|
stonFileReferenceFullName := (self listUnversioned)
|
||||||
select: [ :each | each endsWith: '.ston' ].
|
select: [ :each | each endsWith: '.ston' ].
|
||||||
stonFileReferenceFullName do: [ :each | self uvExport: each ].
|
stonFileReferenceFullName do: [ :each | self uvExport: each ].
|
||||||
^ stonFileReferenceFullName
|
^ stonFileReferenceFullName
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
FossilRepo >> uvLs [
|
|
||||||
|
|
||||||
^ self fossilUv: 'ls' and: ''
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
FossilRepo >> uvSync [
|
FossilRepo >> uvSync [
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user