TFS wrong build.vcs.number.<root_id>

Dear support,

Have a weird issue with build.vcs.number.
I'm trying to implement specific versioning for the project libs depending on the each specific project root vcs version.
I've created multiple vcs roots and was trying to get their current version numbers using this veriable %build.vcs.number.<root_id>%, but it appears that

it shows for all roots the same version, which I believe is wrong.

Any feedback will be greatfuly appreciated.

Thanks,
Alexey

7 comments
Comment actions Permalink

How do you check that this parameter returns the same version for all vcs roots?

0
Comment actions Permalink

Hi,

I'm just putting different root_id, which I've setup additionally. These additional roots correspond to different locations in TFS source tree and which have different local revision numbers, but all of the roots that I've setup returning the same, current latest revision number.

So, let's say we have

Root
|___Location1
|     |____Location12
|___Location2
|_____....__

I've 4 VCS TFS roots that are pointing to Root, Location1, Location12, Location2.

Root recursive version is 5
Location1 recursive version is 3
Location12 recursive version is 2
Location2 recursive version is 1

For all locations vcs.number shows the same value - Root recursive version - 5

Cheers,
Alexey

0
Comment actions Permalink

So you run a build with some VCS root and see in build parameters that build.vcs.number has incorrect value? What revisions are shown on changes tab of this build? Do they correspond to build.vcs.number param?

0
Comment actions Permalink

I'd like to bump this, as we're having the same issue on 8.1.5 (build 30240).

Basically %build.vcs.number% is always returning the current changeset number of the *whole TFS server*, and is NOT scoped to the changesets within the VCS root.

I have tried other pre-defined parameters and none returns the VCS-scoped changeset number, nor does it even appear in the parameters list or build log of a completed build.

Is this by design (difficult to understand why, if so), or a bug?  Is there a workaround?

0
Comment actions Permalink

I'd like to bump this one too! We are facing exactly the same issue.

0
Comment actions Permalink

For me the only way was to write extra step in the build process where I was getting correct version using tfs command line interface.

0
Comment actions Permalink

The related request was raised in our tracker https://youtrack.jetbrains.com/issue/TW-42302. All who are faced with the issue are welcome to comment and share their use cases.

0

Please sign in to leave a comment.