Perforce Dev Branches - Sparse Branching vs. Private Branching

橙三吉。 提交于 2019-12-03 11:35:45

As you noted from the documentation space is not really an issue. Speed is though. Syncing down the entire development tree may take a long time. The integration back will also take a while. If you only need a branch of the tree then both of those operations are much faster.

Human error, as you already said, can occur, but if you make a branchspec, it can help alleviate some of the potential errors.

Syncing speed and client disk space are the issues with creating full branches (lazy copying helps on the server, but not the network or client). However I found it's easier to setup and understand than trying to create a sparse branch, so full branches are what we end up using.

A good situation that sparse branching is suitable for is when you have a complicated product potentially made up of lots of modules. Say the build takes a long time for the whole system, and perhaps the sync takes a while too - lots of data files. But your development only needs to modify a small subset of the whole source base - maybe a module or two, with possibly some linkage code "higher up".

In this case, doing a sparse branch can make a lot of sense. It means you have already synced to the bulk of the stuff, and probably already built too. But you do have to be careful that any files you modify are branched first - otherwise you risk breaking the mainline. Certainly it requires more care by the programmer.

Another case where sparse branching may be the only practical way of doing branched development is if it is hard to have more than one version of your app on a development machine. In this case it would be tricky to have both a mainline build and a development build building and running side by side. Obviously not ideal, but some products are like that either by necessity or history.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!