Parameterised SVN checkout rules

I have setup a VCS checkout rule for SVN to use a parameter reference to specify the particular branch to use.  The configuration parameter has a default value, but is overriden for each custom build.  It appears as though the default value is used to determine the latest revision in SVN but the overriden configuration value is used to checkout the files.

The checkout rule is setup as

+:Branches\%config.BranchName%\Database => Database


The BranchName configuration parameter is setup as

Value: %env.ReleaseBranch%
Spec: text display='prompt'


The environment variable ReleaseBranch is inherited from the project and has the value 3.0.0

Now with SVN setup as below with the latest revision number shown in brackets

Branches
     \ 3.0.0 ( 65667 )
     \ FeatureBranch1 ( 65678 )

When a custom build is run and the value for BranchName is set to FeatureBranch1 it checks out code from the correct branch but for the incorrect revision 65667.

[10:13:01][Updating sources] VCS Root: XXX (5m:10s)

[10:13:01][VCS Root: XXX] checkout rules: Branches/FeatureBranch1/Database=>Database; revision: 65667_2013/08/28 13:45:39 +0100


I tried to work around this by removing the default value from the configuration parameter but that resulted in the build failing to start - showing that it is using the default value and not the value specified in the custom build as the %config.BranchName% part of the checkout rule is replaced with nothing

Error collecting changes for VCS repository 'XXX'
Checkout rule: Branches/FeatureBranch1/Database=>Branches/FeatureBranch1/Database
Branches/Database=>Branches/Database
Path is invalid: 'https://svn-server/root/XXX/Branches/Database'@65667

Is it possible to to use parameter references in this way?

Note I am using TeamCity 7.1 (build 23907)
1 comment
Comment actions Permalink

Hello Craig,

Unforotunatelly, I've found that your scenario is not supported. TeamCity check for the revisions of the files for the CVS path that is specified as the default value for the parameter. Possible workaround is to use a parent CVS path for both branches you intend to checkout for the parameter default value and then when you start the build, specify the relative path.

regrads

Zdenek

0

Please sign in to leave a comment.