How to manage concurrent development with mercurial?

后端 未结 3 1387
说谎
说谎 2020-12-13 20:39

This is a best practice question, and I expect the answer to be \"it depends\". I just hope to learn more real world scenarios and workflows.

First of all, I\'m talk

3条回答
  •  伪装坚强ぢ
    2020-12-13 21:25

    I would always use named branches, because that lets Mercurial do its job: to keep your project history, and to remember why you made which changes in what order to your source code. Whether to have one clone or two sitting on your disk is generally an easy one, given my working style, at least:

    1. Does your project lack a build process, so that you can test and run things right from the source code? Then I will be tempted to have just one clone, and hg up back and forth when I need to work on another branch.

    2. But if you have a buildout, virtualenv, or other structure that gets built, and that might diverge between the two branches, then doing an hg up then waiting for the build process to re-run can be a big pain, especially if things like setting up a sample database are involved. In that case I would definitely use two clones, one sitting at the tip of trunk, and one sitting at the tip of the emergency feature branch.

提交回复
热议问题