Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Fine grained commits: Don't commit unrelated changes together with a fix.
Be responsible: Always check what you're committing: make sure you're only committing what you need. Do a svn diff of the files you're going to commit and check the changes.
Never break the build: Do not commit code that would break the compile. Try to build your sources and make sure that you add all the new files before you do a commit.
Document your commit: Always add a message with a meaningful explanation about the commit. If you are fixing a bug, remember to put a link to the bug in Jira.

Committing:

Always mention the JIRA issue that is related to your commit.

Always follow these steps when committing changes:

...

1. Check out the trunk.
svn checkout svn+ssh://svn.mit.edu/zest/thalia/laszloui/thaliatrunk

2. Find out when the branch was created.
svn log --verbose --stop-on-copy svn+ssh://svn.mit.edu/zest/thalia-/ui/branches/thalia-UI1.0-sprint1/-sprint4 | grep '^r' | tail -n 1

3. Merge branch changes into local copy of trunk (foo == last rev listed by the above svn log).
cd working/copy/of/trunk
svn merge -r foo:HEAD svn+ssh://svn.mit.edu/zest/thalia-/ui/branches/thalia-UI1.0-sprint1/sprint4

4. Inspect merged files and resolve conflicts.

...

Note: If a branch was merged with the trunk at some point in the past, foo above is the rev of the last merge. Do a find for "Merged" instead of looking at the end of the log.

Backing out changes:

Given a rev 'foo' that you want to undo:

cd working/copy/
svn merge -c -foo .
svn commit -m "Backing out change foo"

The '-' before foo is important. From svn help merge:

-c [--change] arg : the change made by revision ARG (like -r ARG-1:ARG)
If ARG is negative this is like -r ARG:ARG-1