Oct 20, 2011

SVN: How to commit ("the true way")

Follow the simple rules then you commit to source control (SVN e.g.):
  1. Before committing the code please update ALL sources. Your code may have references to code in other folders.
  2. Build whole solution.
  3. Run unit-tests. You can use the minimal acceptance scenario for these purposes.
  4. (optional) Run check style utilities such as StyleCop or FxCop.
  5. (optional) Deploy solution locally and manually check changed cases and related functionality.
  6. Commit the code with log message:
    • Use notation:
      • "[+] something has been added (new functions, files etc.)"
      • "[*] something has been changed  (fix bugs, refactoring etc.)"
      • "[-] something has been deleted (delete files, unused classes etc.)"
    • Add Jira or other bugtracker issue number to comments. If you use integrated tools e.g. TortoiseSVN+CSharpTest.Net or Visual Studio+TFS you could select the issue number in the client tool.
    • Add an additional comments about the changes
  7. Check how your code builds on the build-server.
  8. Keep in mind that if your commit is the reason for the project to fail building or otherwise causes a severe bug, you will be taken out of wherever you are (bath, bar, bed whatever) and will be forced into your workplace to fix the problem ASAP ;)

No comments:

Post a Comment