Three Way Merge Algorithms for Text

前端 未结 3 855
死守一世寂寞
死守一世寂寞 2020-12-07 14:51

So I\'ve been working on a wiki type site. What I\'m trying to decide on is what the best algorithm for merging an article that is simultaneously being edited by two users.

相关标签:
3条回答
  • 2020-12-07 15:13

    Frankly, I'd rely on diff3. It's on pretty much every Unix distro, and you can always build and bundle an .EXE for Windows to ensure it is there for your purposes.

    0 讨论(0)
  • 2020-12-07 15:19

    Bill Ritcher's excellent paper "A Trustworthy 3-Way Merge" talks about some of the common gotchas with three way merging and clever solutions to them that commercial SCM packages have used.

    The 3-way merge will automatically apply all the changes (which are not overlapping) from each version. The trick is to automatically handle as many almost overlapping regions as possible.

    0 讨论(0)
  • 2020-12-07 15:26

    There's a formal analysis of the diff3 algorithm, with pseudocode, in this paper: http://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf

    It is titled "A Formal Investigation of Diff3" and written by Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce from Yahoo.

    0 讨论(0)
提交回复
热议问题