Perforce Revision is Wrong in Our Setup
Hi,
We are working on a project which uses perforce and we are building it through TeamCity. We noticed the revision numbers when producing a build (we use %build.vcs.number% to create an output folder) were wrong, they were always higher than what the current revision actually was. We also noticed in the build log, the revision was also wrong during the checkout stage.
The project only has one VCS root, and the VCS root uses a stream in the format:
//DEPOT/STREAM
If we look at the change log of a build configuration it reports the correct revision beside the changes, but always reports the wrong revision when using %build.vcs.number% or reading the checkout logs.
Is there something I'm doing wrong when setting up the VCS root?
Appreciate any information on the matter.
Kind Regards,
John Waring.
Please sign in to leave a comment.
Which TeamCity version are you using? If you see the build log of a build, you can check which revision is being taken, and when it doesn't match the last revision of the repository, it usually logs a message indicating why, but this was introduced recently, so you would need a recent version for it to help.
Hi Denis,
Thanks for your reply.
We are using 10.0.2 (build 42234). Would I need to update in order to isolate the issue?
When checking the build logs, it appears to be grabbing the depots revision, not the stream we are checking out from.
For now, we may have a workaround using the p4 changes command on a build step.
Kind Regards,
John Waring.
Hi John,
I'm going to check this in a bit more depth, just a quick heads up. Several improvements and bugfixes for perforce were indeed introduced between 10.0.2 and the latest release, so it might help. A possibility would be to set up a test server and see if it reproduces in the latest release. If not, then it's probably an issue that was already fixed.
Excellent, yeah I'll look into to setting that up and see if our problem has been addressed.
Cheers for the information. I'll get back to you with any information I come across in a few days.
Hi Denis,
This is indeed fixed in the latest version of TeamCity. We will look into updating our production server asap.
Appreciate the help!
Kind Regards,
John Waring.