开发者

SVN Commit query

开发者 https://www.devze.com 2022-12-15 03:02 出处:网络
Is it correct to use Tortoise SVN Commit for a project that is 开发者_如何学Gobuilding successfully, but has compile time errors?The short answer:Sure.

Is it correct to use Tortoise SVN Commit for a project that is 开发者_如何学Gobuilding successfully, but has compile time errors?


The short answer: Sure.

The long answer: Sure, as long as you're not committing to a branch that other people will expect to be working.

Often developers will commit their daily work in order to make sure it's saved in the repository in case of local machine failure. This is a valid development strategy. However, it's generally accompanied by some kind of SVN branching strategy where developers have a branch to commit to that isn't considered production (or even QA) ready. Developers will work in these branches until they consider their code to be done, and then merge it into trunk or a QA branch where it can be tested.

You don't want to commit non-working code to a branch that people expect to be working at all times, otherwise you're going to have to wear the Beanie of Shame.


It depends on your project's conventions. Most projects/teams don't allow commits that don't build clearly.


Tortoise does not do anything on Syntax or Semantics. It is just "adds" the code to repository. It will commit whatever code you submit.


If the code doesn't compile, keep it out of the trunk branch where other people will pick it up, as then their work will be affected. It's perfectly fine to keep checking in non-working code into your own branch (you can do anything you like), if you're progressing to a solution with each change. But politeness and productivity guidelines would say that you should only contribute to the mainline when it's actually a step forward, not back.

Code branches are like campsites: always leave them in better condition than when you found them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号