Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 59045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:56:37+00:00 2026-05-10T17:56:37+00:00

If two users edit the same wiki topic, what methods have been used in

  • 0

If two users edit the same wiki topic, what methods have been used in wikis (or in similar collaborative editing software) to merge the second user’s edits with the first?

I’d like a solution that:

  • doesn’t require locking
  • doesn’t lose any additions to the page.
  • It may add extra "boilerplate" text to indicate where differing changes were made.

(I’m interested in a solution that could be used to implement this uservoice idea for stack overflow.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:56:38+00:00Added an answer on May 10, 2026 at 5:56 pm

    TWiki automatically merges Simultaneous Edits.

    TWiki allows multiple simultaneous edits of the same topic, and then merges the different changes automatically. You probably won’t even notice this happening unless there is a conflict that cannot be merged automatically. In this case, you may see TWiki inserting ‘change marks’ into the text to highlight conflicts between your edits and another person’s. These change marks are only used if you edit the same part of a topic as someone else, and they indicate what the text used to look like, what the other person’s edits were, and what your edits were.

    TWiki will warn if you attempt to edit a topic that someone else is editing. It will also warn if a merge was required during a save.

    There was also some documentation from that feature being developed detailing how it would behave.

    The basic principles I used in coding up the mergeing algorithm were:

    1. If it’s possible to merge without using conflict markers, do so.
    2. If it’s possible to merge using conflict markers, do so.
    3. If it’s not possible to merge, then the most recent checkin wins.

    It’s worth noting that TWiki has a similar feature to Stack Overflow for collapsing subsequent revisions by the same user within a certain time limit and this caused a bug when happening in conjunction with a merge.

    1. User A edits topic
    2. User A saves rev N
    3. User B edits topic, picks up rev N
    4. User A edits topic again, picks up rev N
    5. User A saves changes; save sees that the change is within the ReplceIfEditiedWithin? window, so does not increment the rev number
    6. User B saves, code sees that the rev number on disc has not changed since they started editing so doesn’t detect a need to merge.

    Also worth noting is that TWiki will warn the second user that the topic is being edited:

    So I invented the concept of ‘leases’. When a topic is edited, a lease is taken on the topic for a fixed period of time (default 1h). If someone else tries to edit, they are told that there is already a lease on the topic, but that doesn’t stop them from editing. It isn’t a lock, it’s just a way of advising them. Mergeing is still the prime resolution mechanism; the lease is purely advisory. If a user – or a plugin – chooses to back away from a topic because someone has a lease out on it, well, that’s up to the plugin.

    The descriptive comment in TWiki.cfg is as follows:

       # When a topic is edited, the user takes a 'lease' on that topic.    # If another user tries to also edit the topic while the lease    # is still active, they will get a warning. The warning text will    # be different depending on whether the lease has 'expired' or    # not i.e. if it was taken out more than LeaseLength seconds ago. 

    note that the lease terminology is only for developers, not end users.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 110k
  • Answers 110k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, it will cause major problems. One example is what… May 11, 2026 at 9:36 pm
  • Editorial Team
    Editorial Team added an answer One of the first principles you learn in OO development:… May 11, 2026 at 9:36 pm
  • Editorial Team
    Editorial Team added an answer you could use java.lang.System.exit(1); May 11, 2026 at 9:36 pm

Related Questions

I don't know how authoritative this is but I found this: http://www.sqlite.org/cvstrac/wiki?p=PerformanceConsiderations and it
How do I distribute a small amount of data in a random order in
What are good ways to handle user input concurrency? As the answers to this
I have designed database tables (normalised, on an MS SQL server) and created a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.