Im writing a program that triggers builds on teamcity, downloads them and runs some tests. As vc revisions for a buildtype are not consecutive I need to find out which revisions actually impact a given build type to avoid running lots of identical builds. So I use something like this to build a list of revisions I could trigger:
Using start and count parameters I keep fetching a bunch of changes untill I arrive at the earliest revision the program should check (the "beginrevision" can be specified by the user).
This approach works pretty well untill I noticed teamcity only lists changes for a specific build type if those changes were made after the buildtype was created. This means the program can only go back until the buildtype was created, which is a major limitation.
I can see two workarounds:
-get the revisions from svn using the vc root supplied by teamcity (EDIT: disregard this, as with this approach I would still have to get the change id's to trigger a build)
-get all changes (ie /httpAuth/app/rest/changes) and, for each change, check if any file is located in the vc root (ie /httpAuth/app/rest/changes/id:6307)
Im not really happy about either, as the first would require me write svn specific code and the second would cause a lot of traffic if I have to go back a lot of revisions.
So basically my question is: is there an easy any way to have teamcity list changes older then the specified buildtype?
PS: I just realized the workarounds above wont work. If a trigger a build with a modificationId that corresponds to a change that is older then the buildtype (ie /httpAuth/action.html?add2Queue=bt996&modificationId=6307), the display version (from /httpAuth/app/rest/builds/id:62050) is incorrect. This makes it impossible for the program to determine a requested build was completed. Also the changes url for the old build (ie /httpAuth/app/rest/changes?build=id:62050) lists no changes.