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
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
\ 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
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)