Can I rely on date/time to get the same sources in CVS?

Hello,
can I use the build date/time information only to get the same sources from CVS repository as were used for the build? I know, it depends on CVS command used for checkout by TeamCity. Which one is used: last content from specified branch/tag OR exactly the content, which was present on the moment of the build initiation (-D option in CVS)?

4 comments
Comment actions Permalink

Jean,

TeamCity always checks out sources from a specific revision which  is usually fixed on the moment of the build start.

If you need to know the  revision that was used in the particular build you can get it in "VCS revisions  and labels" table at Changes tab of a build (just click at VCS revisions and  labels caption to see the table). You can also get the revision inside your  build script using build.vcs.number* property (see more about predefined  properties at
http://www.jetbrains.net/confluence/display/TCD4/Predefined+Properties).

0
Comment actions Permalink

Marina,
the question is, when TC does a checkout from CVS, does it get the last commited revision from the source file or does it checkout a revision, which were available at the moment of build start (say 12:52)? The point is, there is no atomic commit in CVS. If I checkout some sources from specific branch at 12:52 the checkout will end for example at 12:55. The changes, which were commited at 12:54 will be also included in the build. Next time, when I ask for sources at 12:52 I will NOT get the sources which were used for the build.
How exactly do I get the sources, which I have used for the build with CVS? Does TC checkout sources with specific change time (build start)? Does the operation "Label this build sources" work reliably with CVS (the problem described above does not apply)?

0
Comment actions Permalink

As I mentioned earlier, Teamcity checks out a revision, which was available at the moment of the build start (12:52 in your case).

>How exactly do I get the sources, which I have used for the build with CVS?
You can get it in "VCS revisions  and labels" table at Changes tab of a build as revision number.

> Does TC checkout sources with specific change time (build start)?
Yes, as described above.

>Does the operation "Label this build sources" work reliably with CVS (the problem described above does not apply)?
Yes, it shoul label exactly the sources used for the build.

0
Comment actions Permalink

The issue was cleared, thanks!

0

Please sign in to leave a comment.