Any way to create variable shortcuts for common configuration properties


I wanted to add a new configuration for a new repository (under the same project). So I did the obvious and cloned the configuration which worked fine.
However the configuration is littered with references to the previous repository e.g $Source.trunk.Path$ which now have to be manually updated (~50).

Is there a way to create a variable/shortcut that I could reference all the related $Source.trunk.*$ properties.
I thought I could create a variable for each one but that would still require ~10 variables considering all the sub properties we use.

Is there a better way of doing this?

Simon Kennedy

Hi Simon, its possible to an extent;

You can assign an expression variable ‘$Source.MYREPONAME.BranchName$’ to %branchname% then if ‘MYREPONAME’ changed you would only need to change a single variable.

You cannot however do an expression like ‘$Source.%myreponame%.BranchName$’ where ‘myreponame’ is another text variable containing the variable ‘MYREPONAME’.


That’s disappointing

I have a similar problem and used the method from peter. Maybe it would be good to allow definition of object aliases or assignment of objects to variables (e.g. %myRepo% = $source.myRepo$)