0

Is it correct to use Tortoise SVN Commit for a project that is building successfully, but has compile time errors?

2
  • 1
    I'm having a hard time understanding your question. Are you asking if it's proper to commit code that builds, but doesn't compile? How is that possible? Commented Jan 3, 2010 at 8:27
  • I think he is asking whether he can upload an "illegal" code to SVN. I assumed that ;) Commented Jan 3, 2010 at 8:28

4 Answers 4

4

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.

Sign up to request clarification or add additional context in comments.

Comments

3

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

Comments

2

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

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.