3

We have a strange way of using repos here (and I have little control over it I'm afraid), where a root repo holds multiple projects... no fancy stuff like trunk/tags/branches folder either... (I'm so sad).

So for example the structure looks like this:

http://my.svn.root/main
                      |-- /Project1
                      |-- /Project2
                      ...

and so on...

Now, doing svn log on the folders will give me the latest revision number in that folder. Problem is that TeamCity seems to be doing svn info on the root, so even if I specify a VCS root like this:

http://my.svn.root/main/Project1

the %build.vcs.number% property seems to be picked from the main root of the repo, so a commit in Project2 will actually advance that number (which is not what I would like).

Is there a way to tell TeamCity to use the subfolder latest commit number rather than the root revision? or a different property that does just that?

Thanks!

1 Answer 1

2

Hmmm, apparently it's all due to the VCS root settings. Basically the best option would be to have a root set up to the main and then edit the checkout rules:

VCS root: http://my.svn.root/main

checkout rules: +:Project1=>.

This seems to be a lot more stable and also more responsive in terms of Build triggering.

2
  • This is great advice. It should be included on a TeamCity Best Practices page. Commented Jun 27, 2013 at 22:44
  • Still does not work on TeamCity 8 (( . it returns value of the most recent revision no matter what branch you do checkout.
    – dollar2048
    Commented Feb 16, 2015 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.