Knowledge Base‎ > ‎‎ > ‎Development Process‎ > ‎

Committing Code

How to Commit Code

NOTE: The information below is deprecated since the move to github. It will be updated soon.

Once you've made your changes locally, follow these instructions to commit them to the repository:

1) cd to the directory in your local repository where your changes reside. For example:
$ cd ~/edcode-dev/flubaroo

2) Run "svn update" to get any changes that others have made to the same files you're working on. You'll need to incorporate these if there are any conflicts. You may also want to retest your changes if there have been updates.

3) Run "svn diff" to ensure that you are only submitting the changes you intent to. This command shows you the difference between your working file, and the latest version in the repository.

As an example, here I just changed just one line in the file "definitions.gas", by changing the version number for Flubaroo from 2.0 to 2.1. Running svn diff shows:

$ svn diff

Index: definitions.gas
--- definitions.gas (revision 5)
+++ definitions.gas (working copy)
@@ -3,7 +3,7 @@
 // This file contains all constants and global variable definitions.
 // Current version. Shown in "About Flubaroo" dialogue.
-gbl_version_str = "Version 2.0";
+gbl_version_str = "Version 2.1";

The command tells me the the most recent version of this file in the repository is "revision 5" (aka "r5"). It also shows me a few lines of code before the changed line, for reference.
The "-" sign before a line indicates a line that has been removed (as compared to the latest version in the repository). In this example the line with "Version 2.0" was removed:

      -gbl_version_str = "Version 2.0";

The "+" sign before a link indicates a line that has been added in your existing version (as compared to the latest version in the repository). In this example a line with the new version, "Version 2.1", was added in the same location:

+gbl_version_str = "Version 2.1";

4) Once you're sure that you're submitting only the changes you intend to, run "svn commit". 

svn commit --username -m "Fix for Issue 509. Corrects calculation error for total score."

Be sure to include a descriptive commit message using "-m", which also references the issue number being addressed. 

5) You'll be prompted for your repository password, which you can access by logging into the repository site, and then clicking on the "Source" tab, and then the " password" link:

If all goes well, you'll see output like this:

Authentication realm: <> Google Code Subversion Repository
Password for '': 
Sending        flubaroo/definitions.gas
Transmitting file data ..
Committed revision 6.

For questions or issues, email