This guide explains how to update your copy of the source code, and how to publish your changes so the rest of us can see them. This guide assumes you have cloned our repository as explained in How to get the source code.

 If you have any problems when trying to use this guide then just email me at This email address is being protected from spambots. You need JavaScript enabled to view it. and I'll update/fix the guide.



1. The first step is to find the folder you cloned in the last guide, and synchronize with our code repository. TortoiseHg is a Mercurial client, which is a distributed revision control system. Distributed revision control systems usually require two steps to update your code, and two (or more) steps to publish your changes to everyone else. Right click on the folder and choose TortoiseHg->Synchronize

2. This step only needs to be done the first time that you update/commit code. If you've already done this before then you can skip ahead to step 3.

You'll need to configure your username the first time you update/commit to or from the repository. This can be done by right clicking on the folder and choosing TortoiseHg->Global Settings. Then go to the Commit section, enter your username in the username field, and then click ok.

3. From here you have a multitude of options, but the one we care about right now is "pull". In TortoiseHg, "pull" will pull any changes that people have published onto your computer so that you can update your own copy of the code. Choose "pull" and when it asks you for a password then enter your BitBucket account password. Depending on the version of TortoiseHg you've installed, this might look different than the picture, but hovering over the buttons and reading their tooltips should let you figure it out.

 4. After TortoiseHg is finished pulling the changes to your computer, you simply have to update your folder. You can do this by right clicking on the folder, and selecting TortoiseHg->update. This will bring up a dialog box that will allow you to update your folder. Just click the "Update" button and you're done. Most of the time you won't have to worry about any of the other options, but if it's refusing to update because of files you've changed, and you just want to download the latest ones from the repository without caring about losing your changes, then you can check "Discard local changes, no backup (-C/--clean)"

Committing changes

1. Whenever you make changes to the code you'll need to commit those changes to the source code repository. Committing changes just means publishing them for the rest of us to access. The first step when committing changes is to go to the project folder that you cloned in the last guide.

2. If you've only made changes to files, and haven't added any new ones, or renamed/moved any, then you can skip to the next step. If you've created new files, or renamed/moved existing ones though: then you'll have to go to each file, right click on it, and choose TortoiseHg->Add Files...

 All you'll have to do in this dialog is click the "Add" button and move on to the next step.

NOTE: If you choose to right click on a folder instead of a file, then choose TortoiseHg->Add Files... it will add all the new files in that folder. If you decide to do it this way then make sure to look through the list of files to add in the dialog box that pops up, and uncheck anything you don't need. A lot of project files are generated automatically and don't need to be added to the repository.

 3. After adding any new files you might have created, go back to the main project folder, right click on it, and choose Hg Commit to bring up the Commit dialog.

The commit dialog is shown below. First you need to enter a commit message to describe the changes you made; this can be just about anything that you want and will show up on our repository page to help everyone keep track of what's going on with the code. Chances are good you'll see a lot of anime references here because of me and Kyle.

After entering your message, look to the left side (outlined in green) where all the filenames show up. Files to be added appear in green with an A next to them, files that have changed appear in blue with an M next to them, and files that have been removed appear in red with a ! next to them. The pink files with a ? next to them are untracked files and can be ignored. If you deleted any files, then make sure to check the box next to its red entry in this list if you want to make sure that it's deleted from the repository. 

After checking to make sure that everything is in order, just click the Commit button at the bottom and move on to the next step.

4. Finally, you can upload your changes to the repository. After committing them, you simply right click on the project folder and choose TortoiseHg->Synchronize, then run "push". This is just like running "pull" except you'll use the "push" command to push your changes to the repository, instead of pulling other people's changes.

You'll have to enter your BitBucket password again.

Now your changes have been published, and everyone else can pull them to test out on the robot!