TWiki automatically merges Concurrent Changes .
TWiki allows several simultaneous changes to the same theme, and then automatically changes the various changes. You probably won't even notice this unless there is a conflict that cannot be automatically combined. In this case, you can see how TWiki inserts “label changes” into the text to highlight the conflicts between your changes and the other person. These change labels are only used if you are editing the same part of the topic as someone else, and they indicate what the text looked like, what the other person was made to, and what your changes were.
TWiki will warn you if you try to edit a topic that someone is editing. He will also warn that merging is required during the save.
In addition, some documentation was developed from this function, which describes in detail how it will behave.
The basic principles that I used in coding the merge algorithm were as follows:
- If merging is possible without the use of conflict markers, do so.
- If merging using conflict markers is possible, do so.
- If this cannot be combined, the last session wins.
It is worth noting that TWiki has a similar function in Qaru to collapse subsequent changes by the same user for a certain period of time, and this caused an error when it occurs with the merge .
- User A is editing a topic.
- User A saves rev N
- User B edits the topic, selects rev N
- User edits topic again, selects rev N
- User A saves the changes; does save see the change is within the ReplceIfEditiedWithin? window, so do not increase the speed
- User B saves, the code sees that the turnover number on the disk has not changed since they started editing , so the need for merging is not detected.
It is also worth noting that TWiki warns the second user that the topic is being edited:
So, I came up with the concept of "rent." When a topic is edited, rent is taken on the topic for a fixed period of time (default is 1 hour). If someone else is trying to edit, they are informed that there is already a rental on this topic, but this does not prevent them from editing. This is not a castle, but simply a way to advise them. Consolidation is still the primary resolution mechanism; rent is purely advisory. If the user - or the plugin - prefers to move away from the topic, because someone has leasing on it, well, what about the plugin.
A descriptive comment in TWiki.cfg is as follows:
Please note that rental terminology is for developers only and not for end users.
Sam hasler
source share