How to Get the Latest from Subversion

Let’s say you are using Subversion as your source code control system and you want to have a batch file retrieve the latest source code from trunk. You may execute the following statements on a directory that already has been checked out.

The common practice is to always update the repository for checking in new code in order to resolve local conflicts and ensure the build compiles locally.

@echo off echo Getting the latest version of the MyRepo files… svn cleanup C:\Repositories\MyRepo svn update C:\Repositories\MyRepo

Here is another tip when using source code control: Never group several projects into one repository. Always create separate repo for each projects. This makes it easier to branch off and collaborate with others.

Advertisements