List all VCS in project and get their revision

Hi,

We have a lot of projects that have several VCS roots attached. I would like to get the revison for all the VCS in the project so i can procedure a file like this, that I can display on a tab on each build:

TestProject, includes VCS: BI,Common,CommonLife_xxx

 

 

Update list 

hg up -R BI --rev 58e144eda8536d5184c760c120198ee1de627ab8

hg up -R Common --rev 090305bf00fb6949658d95216040fee641fae706
hg up -R CommonLife_xxx --rev acc3d94bfe9406efa351e8464c08f9f2604eed8d

 

Is there a way to list the VCS in the project and then parse the output to make my file?

The following list of statements can be used for updating a clone to the one used for building.

 

 

0
1 comment

Hi Gordon,

If you want to do it from within a given build, while you can still do a request to the REST API, you can also use the %build.vcs.number.x% to gather the revision being used for the VCS "x" (where x is a numeral, representing the order, and starting on 1), although you cannot iterate through them, so you will need to specify them manually. Also take into account that this will only return the revision number, so if you want any extra information about it for your commands, you will need to gather it either using the specific vcs command (such as hg) or picking it up from the REST API again.

If you want to do it from outside, you can use the REST API to gather all information about a project: https://confluence.jetbrains.com/display/TCD10/REST+API#RESTAPI-ProjectsandBuildConfiguration/TemplatesLists, but specific revisions aren't attached to a VCS Root or project, specific revisions are used in a build, so you might need to check the build details if you are looking for that.

0

Please sign in to leave a comment.