What success has anyone had in merging changes made in different copies (“forks”) of the same original wiki? KeePass can automatically merge changes between different copies of the same password file. Having this same feature in TW would be incredibly valuable, given the need to host wikis in different ways for different usage environments.
I assume this example means you expect “batteries included” functionality in vanilla TiddlyWiki rather than merging wikis (be them single HTML file or Node.js ones) using external diff/merge tools?
There are many ways to do this starting with exporting tiddlers you want to transfer from one wiki and importing into the other.
- You can do this for bulk tiddlers or if you know the specific tiddlers all the better.
When you say merge there may be choices or information you need to append values, choose which copy wins etc… it all depends on the nature of the two wikis, the tiddlers and what may be involved, and to what purpose?
big difference with keepass vs TW is that for any given entry in keepass (or indeed, any password management system) you can with reasonable confidence assume that the newest version of two conflicting entries with the same name, is the relevant one. Afterall, only one user+password can be valid, each update superceding the previous.
keepass also keeps older revisions of each entry, which allows for merging logic to detect if both sides of a merge had changes after their common ancestor.
the same confidence cannot be made in TW, where notes may contain any content and one doesn’t logically supercede the other. And TW does not normally keep historic versions within itself, meaning the data to find a common ancestor is not there.
I certainly imagine tools could be built to do. For instance, @Yaisog has this revision history plugin ( In-Wiki Incremental Revisions -- Now Even Better! - #15 by Yaisog ) which conceptually provides the required information to detect if there have been edits on both sides of a common ancestor for any given tid.
The impression I’ve gotten is that most people work around the merge forked versions problem, either by personal usage policy of keeping strict track of which device has the “live” copy, and ensuring it’s the one copied to the next device as needed. Or using node so there is just one version, which can be reached over the network from multiple devices (that’s what I do)
Your approach has been what I’ve tried to do, though I used TiddlyHost instead of a self-hosted node solution. (There’s no easier way to have private cloud-hosted wikis, IMHO.)
But that approach breaks down for me when cell connections get shaky (common at schools in my area that I visit frequently for my kids) or corporate network policies block my site.
For these reasons, I’ve moved to Quine (excellent iPhone app) and Dropbox for “hosting” my personal wikis. But my use of TiddlyDesktop for more “involved” editing can cause Dropbox to freak-out and create a dozen duplicates of my wiki in a single afternoon, leaving me to figure-out where all my changes went.
I’ll take a look at that plugin you mentioned - I was already thinking that keeping a “pile of diffs” (like git or Fossil SCM) would be ideal. But since I already have concerns about network transit times, that may make the cure worse than the disease. The quicker solution for me may be finding another “on-device hosting” alternative to Dropbox.
You can use the AdvancedSearch to export recently modified tiddlers and import them to your other wiki.
[has[modified]!is[system]!sort[modified]limit[50]]
The import dialogue has a diffing tools. In the screenshot below, the imported content would delete the text that is highlighted. So you can check on a per tiddler basis.
There is no existing tool, that can resolve conflicts, because auto-merging will always be wrong for some users. Most merge conflicts have to be resolved manually.