Computer Laboratory

Updating your working copy

This information is from TortoiseSVN Help

Periodically, you should ensure that changes done by others get incorporated in your local working copy.

The process of getting changes from the server to your local copy is known as updating.

Updating may be done on single files, a set of selected files, or recursively on entire directory hierarchies.

To update:
  • Select the files and/or directories you want to update
  • Right click and select TortoiseSVN -> Update in the explorer context menu.
  • A window will pop up displaying the progress of the update as it runs.
  • Changes done by others will be merged into your files, keeping any changes you may have done to the same files.
  • The repository is not affected by an update.
  • Multiple files/folders: If you select multiple files and folders in the explorer and then select Update, all of those files/folders are updated one by one.
    TortoiseSVN makes sure that all files/folders which are from the same repository are updated to the exact same revision, even if between those updates another commit occurred.

updating finished dialogue box

The progress dialogue box above uses colour coding to highlight different update actions:

Purple: New item added to your WC.
Dark Red: Redundant item deleted from your WC, or missing item replaced in your WC.
Green: Changes from repository successfully merged with your local changes.
Bright Red: Changes from repository merged with local changes, resulting in conflicts which you need to resolve.
Black: Unchanged item in your WC updated with newer version from the repository.
(These are default colours, but they can be customised)

Notes:
  1. If you get any conflicts during an update (this can happen if others changed the same lines in the same file as you did and those changes don't match) then the dialogue box shows those conflicts in red. You can double-click on these lines to start the external merge tool to resolve the conflicts.
  2. Local File Already Exists: Sometimes when you try to update, the update fails with a message to say that there is already a local file of the same name. This happens when Subversion tries to checkout a newly versioned file, and finds that an unversioned file of the same name already exists in your working folder. Subversion will never overwrite an unversioned file.
    If you get this error message, the solution is simply to rename the local unversioned file. After completing the update, you can check whether the renamed file is still needed.
  3. When the update is complete, the progress dialogue box shows a summary of the number of items updated, added, removed, conflicted, etc. below the file list. This summary information can be copied to the clipboard using CTRL+C.
  4. You can use an Update to Revision... command, but this is not recommended as it can leave your working copy in an inconsistent state. For more information on this command and Save Revision, view the TortoiseSVN Help.

For more information on Updating, view the TortoiseSVN Help.