Improving resynchronize.
This commit is contained in:
parent
528c5adf29
commit
4764f989b7
@ -112,7 +112,8 @@ TiddlyWiki >> detectRepositoryLocal [
|
||||
| folder folderItems |
|
||||
folder := self file parent.
|
||||
folderItems := folder children.
|
||||
[(folderItems select: [ :path | path basename beginsWith: '.fslckout' ]) isEmpty
|
||||
[(folderItems select: [ :path | (path basename beginsWith: '.fslckout') or:
|
||||
[ path basename beginsWith: '.fossil']]) isEmpty
|
||||
and:[ (folder = FileLocator root) not ]]
|
||||
whileTrue: [folder := folder parent.
|
||||
folderItems := folder children.].
|
||||
@ -399,10 +400,26 @@ TiddlyWiki >> rebuildTiddlers [
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> rebuildTiddlersJSON [
|
||||
|
||||
self tiddlers: self rebuildTiddlers.
|
||||
self tiddlers: self rebuildTiddlersWithoutShadows.
|
||||
^ self exportJSONSubtiddlers: (self rebuildTiddlers asArray) as: 'rebuildedTiddlers'.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> rebuildTiddlersWithoutShadows [
|
||||
|
||||
| stonTiddlers contentTiddlersFiles |
|
||||
contentTiddlersFiles := self tiddlersFolder files
|
||||
select: [ :each | each basename endsWith: 'ston' ].
|
||||
|
||||
stonTiddlers := OrderedCollection new.
|
||||
stonTiddlers
|
||||
addAll: (((self largeTiddlersFolder files)
|
||||
reject: [ :each | each basename beginsWith: '_shadow.ston' ])
|
||||
collect: [ :each | STONJSON fromString: each contents ]);
|
||||
addAll: (contentTiddlersFiles collect:[ :each | STONJSON fromString: each contents ]).
|
||||
^ stonTiddlers
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> remote [
|
||||
|
||||
@ -426,6 +443,17 @@ TiddlyWiki >> repository [
|
||||
^ repo
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> resynchronize [
|
||||
|
||||
| repository |
|
||||
repository := self repository.
|
||||
repository update.
|
||||
self exportContentTiddlers.
|
||||
repository addRecentChangesFromWiki: self.
|
||||
^ self rebuildTiddlersJSON
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> selectContentType: mimeType [
|
||||
|
||||
@ -482,13 +510,6 @@ TiddlyWiki >> tiddlersJSONUrl [
|
||||
self remote ifNil: [^ nil].
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> updateAndRebuildTiddlersJSONWithFossilRepo [
|
||||
|
||||
self repository update; uvExportSTON.
|
||||
^ self rebuildTiddlersJSON
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> withoutContentType: application [
|
||||
| filteredTiddlers tempWiki |
|
||||
|
Loading…
Reference in New Issue
Block a user