Flexible vs static branching (Git vs Clearcase/Accurev)

后端 未结 9 1076
感情败类
感情败类 2020-11-27 12:53

My question is about the way in which Git handles branches: whenever you branch from a commit, this branch won’t ever receive changes from the parent branch unless you f

9条回答
  •  心在旅途
    2020-11-27 13:21

    Theory aside, here's a kind of obvious practical take on this, from my perspective using AccuRev in a commercial production environment for a number of years: The inheritance model works very well as long as child streams haven't diverged too much from ancestors that are still in development. It breaks down when the inheriting streams are too different.

    Inheritance (later versions as children of earlier ones) allows changes in ancestor streams to be active in child streams without anyone doing anything (unless a merge is required, in which case it shows up as deep overlap, which is good to be able to see).

    That sounds great, and in practice it is, when all streams involved are relatively similar. We use that model for hotfix and service pack level streams below a given production release. (It's a actually a bit more complicated than that for us, but that's the general idea.)

    Production releases are in parallel, no inheritance, with those hotfix and service pack children below each of them. Starting a new release means creating a new release-level stream, and manually pushing everything from the most recent maintenance stream for the prior release into it. After that, changes to earlier releases that apply to later ones have to be manually pushed into each of them, requiring more work, but allowing much greater control.

    We originally used the inheritance model across all releases, where later ones were children of earlier ones. That worked well for a while, but got unmanageable over time. Major architectural differences across releases made unavoidably inheriting changes a Bad Idea. Yes, you can put a snapshot in between to block inheritance, but then all changes have to be pushed manually, and the only real difference between parent-snapshot-child and parallel non-inheriting streams is that the entire graphical stream view continually pushes down and to the right, which is a PITA.

    One really nice thing about AccuRev is that you have this choice, all the time. It's not a inherent constraint of your SCM program's architecture.

提交回复
热议问题