Configure Subversion repository

In order to use this repository, Subversion client software should be installed on your build machine. You can download subversion from http://subversion.tigris.org.

[Note]Note

Please keep time of the build server machine in sync with the Subversion server machine to allow build server to detect repository's changes in Subversion server more accurately.

Here are list of properties for this repository:

Repository url base

The base part of Subversion url, for example, you can enter svn://buildmachine.foobar.com/, or file:///c:/svn_repository, or svn://buildmachine.foobar.com/myproject/othersubdirectory, etc. Other definitions such as tags directory, branches directory, or modules are relative to this base url.

[Note]Note

If you are using https:// schema, you should make sure that svn server certificate has been accepted permanently by your build machine.

Directory for trunk

Directory used to hold trunk for this url base. This directory is relative to the url base. Leave it blank, if you didn't define any trunk directory in the above url base.

Directory for branches

Directory used to hold branches for this url base. This directory is relative to the url base. If left blank, "branches" will be used as the default value.

Directory for tags

Directory used to hold tags for this url base. This directory is relative to the url base. If left blank, "tags" will be used as the default value.

Username

User name to use to login to Subversion.

Password

Password to use to login to Subversion.

Path to svn executable

Specify path to your svn executable file. For example: /usr/local/bin/svn. It should be specified here, if it does not exist in the system path.

Quiet period

Number of seconds current repository should be quiet (without checkins) before QuickBuild decides to check out the code from this repository for a build. This is used to avoid checking out code in the middle of some other checkins. This property is optional. When set as 0, quiet period will not be used before checking out code to build.

Modules

Here are list of properties you should configure in order to define a Subversion module:

Source path

Represents a path in the Subversion repository, for example /, testsvn/web, or /testsvn. This path is considered to be relative to the url base defined above. When branch or label properties are defined, this path will be mapped to another path in the svn repository.

Branch

Specify the branch for above source path. When left empty, trunk is assumed.

[Note]Note

Subversion does not internally has the notion of branch. Value specified here will be used by QuickBuild to do url mapping for the above source path so that actual effect is just like a branch in CVS repository.

Label

Specify the label for the above source path. If specified, it will take preference over branch. When left empty, head version of the specified branch is assumed.

[Note]Note

Subversion does not internally has the notion of label. Value specified here will be used by QuickBuild to do url mapping for the above source path so that actual effect is just like a tag in CVS repository.

Destination path

If specified, the contents from Subversion repository will be retrieved to the destination path relative to the project work directory. Otherwise the contents will be retrieved to source path (with no regard to branch or label) relative to the project work directory.

At least one module should be defined for Subversion repository. Source path represents a path in the Subversion repository, for example testsvn, testsvn/web, or /testsvn. This path will be mapped to another path in the Svn repository based on other properties. In order to demonstrate this path mapping, we define following properties:

Repository url base: svn://localhost
Directory for trunk: trunk
Directory for branches: branches
Directory for tags: tags

We will examine the following module settings and give them the url mapping:

Source path: testsvn/web, branch: <empty>, label: <empty>, destination path: <empty>

QuickBuild will check out code from url svn://localhost/trunk/testsvn/web to directory <configuration checkouts directory>/testsvn/web.

Source path: testsvn/web, branch: dev2.0, label: <empty>, destination path: <empty>

QuickBuild will check out code from url svn://localhost/branches/dev2.0/testsvn/web to directory <configuration checkouts directory>/testsvn/web.

Source path: testsvn/web, branch: <empty>, label: v1.0, destination path: <empty>

QuickBuild will check out code from url svn://localhost/tags/v1.0/testsvn/web to directory <configuration checkouts directory>/testsvn/web.

Source path: testsvn/web, branch: dev2.0, label: v1.0, destination path: testsvn/web/dev2.0

QuickBuild will check out code from url svn://localhost/tags/v1.0/testsvn/web to directory <configuration checkouts directory>/testsvn/web/dev2.0.

[Note]Note

Branch definition is ignored here because label definition takes preference.

When QuickBuild tags a version for example v1.0 for code checked out to directory <configuration checkouts directory>/testsvn/web, the following command will be issued: svn copy <configuration checkouts directory>/testsvn/web svn://localhost/tags/v1.0/testsvn/web

Of course you can avoid the above url mapping, by giving Directory for trunk property empty value, and giving Branch and Label properties both empty values. This way, you can control where to check out the code from, and where to put checked out code to, by just using the Source path and Destination path properties (in this case, source path will only be prefixed with repository url base property defined at the project level).

As you may realized, if QuickBuild need to create label v1.0 for moduleA and moduleB, two directories will be created in Subversion repository, respectively svn://localhost/tags/v1.0/moduleA, and svn://localhost/tags/v1.0/moduleB. In this way under a certain url base, only one tags directory is needed to hold tag information for every module. This is the preferred tags or branches schema in QuickBuild. However, the suggested schema in Subversion user manual (every module has its own trunk, branches, or tags directory) is also supported by defining multiple repositories:

  1. Create a Subversion repository with the following properties

    Repository url base

    svn://localhost/moduleA

    Directory for trunk

    trunk

    Directory for branches

    branches

    Directory for tags

    tags

    Modules

    Define moduleA with the following properties:

    Source path

    /

    Branch

    Label

    Destination path

    moduleA

  2. Create the second Subversion repository with the following properties

    Repository url base

    svn://localhost/moduleB

    Directory for trunk

    trunk

    Directory for branches

    branches

    Directory for tags

    tags

    Modules

    Define moduleB with the following properties:

    Source path

    /

    Branch

    Label

    Destination path

    moduleB

  3. Create two checkout steps to check out codes from the above two repositories respectively, and include these two steps in the default step.