Improving status management.
This commit is contained in:
parent
c45692465d
commit
6e12663256
@ -120,10 +120,10 @@ FossilRepo >> checkinsFor: relativeFilePath [
|
||||
{ #category : #accessing }
|
||||
FossilRepo >> checkoutDateAndTime [
|
||||
|
||||
| date time dateTime splitedCheckout |
|
||||
splitedCheckout := (self status lines detect: [ :line | line beginsWith: 'checkout:' ])splitOn: ' '.
|
||||
date := splitedCheckout at: 7.
|
||||
time := splitedCheckout at: 8.
|
||||
| date time splitedCheckout |
|
||||
splitedCheckout := (self status at: 'checkout') splitOn: ' '.
|
||||
date := splitedCheckout at: 2.
|
||||
time := splitedCheckout at: 3.
|
||||
^ (date, time) asZTimestamp
|
||||
]
|
||||
|
||||
@ -328,7 +328,7 @@ FossilRepo >> local: aLocalFilePath [
|
||||
FossilRepo >> localRoot [
|
||||
|
||||
local ifNotNil: [ ^ self local fullName ].
|
||||
^((self status lines detect: [ :line | line beginsWith: 'local-root:' ]) splitOn: ':') second trimmed
|
||||
^ self status at: 'local-root:'
|
||||
]
|
||||
|
||||
{ #category : #authentication }
|
||||
@ -392,9 +392,7 @@ FossilRepo >> repository [
|
||||
|
||||
repository ifNotNil: [ ^ repository ].
|
||||
self isOpen ifFalse: [ ^ nil ].
|
||||
^ repository := ((self status lines detect:
|
||||
[ :line | line beginsWith: 'repository:' ])
|
||||
splitOn: ':') second trimmed.
|
||||
^ repository := self status at: 'repository'.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
@ -415,8 +413,15 @@ FossilRepo >> sanitize: aFileNameWithRelativePath [
|
||||
|
||||
{ #category : #accessing }
|
||||
FossilRepo >> status [
|
||||
|
||||
^ self command: 'status'
|
||||
| output |
|
||||
output := OrderedDictionary new.
|
||||
(self command: 'status') linesDo: [ :line | |k v temp|
|
||||
temp := line splitOn: ': '.
|
||||
k := temp first.
|
||||
v := temp second trimmed.
|
||||
output at: k put: v.
|
||||
].
|
||||
^ output
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user