Improving and creating synchronize methods for fossil repos.
This commit is contained in:
parent
57401052b4
commit
f44e2dfece
@ -30,6 +30,23 @@ TiddlyWiki class >> fromJSONUrl: anUrlString [
|
||||
name: anUrlString
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> addRecentChangesToRepo [
|
||||
|
||||
| docsSton docsStonSanitized recentTiddlers repository |
|
||||
repository := self repository.
|
||||
self
|
||||
exportJSONFile;
|
||||
importJSONFile.
|
||||
recentTiddlers := self changesAfter: repository checkoutDateAndTime.
|
||||
docsSton := recentTiddlers collect: [:each | each exportSTONFile].
|
||||
"Collecting tiddlers file reference as string and adding to the repo"
|
||||
docsStonSanitized := docsSton collect: [ :each |
|
||||
(each fullName removePrefix: repository localRoot) allButFirst ].
|
||||
docsStonSanitized do: [ :each | repository add: each ].
|
||||
^ repository status
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> addToConfigFile [
|
||||
| cleaned newConfig |
|
||||
@ -489,17 +506,15 @@ TiddlyWiki >> repository [
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> resynchronize [
|
||||
|
||||
| repository |
|
||||
self
|
||||
exportJSONFile;
|
||||
importJSONFile.
|
||||
| repository return |
|
||||
repository := self repository.
|
||||
repository update.
|
||||
return := Dictionary new
|
||||
at: 'status' put: self addRecentChangesToRepo.
|
||||
self exportSTONFiles.
|
||||
self exportContentTiddlers.
|
||||
self exportLargeTiddlers.
|
||||
repository addRecentChangesFromWiki: self.
|
||||
^ Dictionary new
|
||||
at: 'status' put: repository status;
|
||||
^ return
|
||||
at: 'file' put: self rebuildTiddlersJSON;
|
||||
yourself.
|
||||
]
|
||||
@ -520,6 +535,26 @@ TiddlyWiki >> shadow [
|
||||
^ self tiddlers select: [:tiddler | tiddler title beginsWith: '$:/']
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> syncRemoteLocalDestructive [
|
||||
|
||||
| repository |
|
||||
repository := self repository.
|
||||
repository update.
|
||||
repository revertRemoteUnversioned.
|
||||
repository exportHTMLUnversioned.
|
||||
self
|
||||
exportJSONFile;
|
||||
importJSONFile.
|
||||
self exportSTONFiles.
|
||||
self exportContentTiddlers.
|
||||
self exportLargeTiddlers.
|
||||
^ Dictionary new
|
||||
at: 'status' put: repository status;
|
||||
at: 'tiddlers from STON' put: self rebuildTiddlers;
|
||||
yourself.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> taggedWith: aTag [
|
||||
^ self tiddlers select: [:tiddler |
|
||||
|
Loading…
Reference in New Issue
Block a user