What makes merging in DVCS easy?

后端 未结 9 1129
有刺的猬
有刺的猬 2020-11-30 20:04

I read at Joel on Software:

With distributed version control, the distributed part is actually not the most interesting part.

The inte

相关标签:
9条回答
  • 2020-11-30 20:45

    Whoa, attack of the 5-paragraph essays!

    In short, nothing makes it easy. It is hard, and my experience indicates that errors do occur. But:

    • DVCS forces you to deal with merging, which means taking a few minutes to familiarize yourself with the tools that exist to help you out. That alone helps.

    • DVCS encourages you to merge frequently, which helps too.

    The snippet of hginit that you quoted, claiming that Subversion is unable to do three-way merges and that Mercurial merges by looking at all the changesets in both branches, is simply wrong on both counts.

    0 讨论(0)
  • 2020-11-30 20:45

    One thing I find easier with DVCS is that each developer can merge their own changes into which ever repository that they desire. It's much easier to handle merge conflicts when you're merging your own code. I've worked in places where some poor soul had fixed merge conflicts by finding each developer involved.

    Also with a DVCS you can do things like clone a repository, merge work from two developers into the clone, test the changes, then merge from the clone back into the main repository.

    Pretty cool stuff.

    0 讨论(0)
  • 2020-11-30 20:47

    May be DVCS users just never do things that make merging hard like refactorings that change and rename/copy most files in the project, or redesigning from stratch APIs that are used in the hundrends of files.

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