I'm working on a larger project in a team of 5 developers and we're using Mercurial as VCS.
We all tend to work and commit locally until we deem a feature / fix ready to be pushed and then merge and push our changes. I usually push (and thus merge with remote) several times a day, as do most of the others.
This often leads to "merge clutter": multiple devs pull, merge and push changesets. The resulting history is not very pretty, and sometimes it looks like this:
I doubt one could isolate a specific changeset in that mess, or even figure out how / what it affected in what way (at least I shudder at the prospect).
If the merges were necessary, the above history would be fine I guess, but most of these merges could be avoided (safely) by rebasing, since every developer works on specific tasks that are more ore less isolated from the rest.
The actual question:
- Is it "normal" that VCS histories look like the above? Should such histories be avoided?
- How would one avoid such a history?
About the "avoid" part: Since the tasks we work on are somewhat isolated (Backend, Frontend, Web), we could split them into branches or maybe even separate repositories. The projects are not completely independent from each other though, so I suppose splitting into several repos causes more pain than gain. I'm not sure if named branches would be much better either, since then we constantly have 3+ branches there which would have to be merged ferquently into trunk.
Rebasing seems like an option, especially since many changesets are completely independent from each other – however this puts the burden of deciding whether to rebase or not on the developer. There may be conflicts and then one would have to merge after all. This may well lead to people not rebasing in the first place, so we're back to where we are now.
Right now I can't think of another option to make the history look cleaner. It may not be much of an issue now, but what happens when there are suddenly 20 developers? If the history is one big maze, then what's the point of it? I deem it hard to track the effects of a changeset if there are dozens of intersections.