views:

58

answers:

2

I want to look at a production binary and know which revision in the SCM corresponds to that build. How it is possible? Can I accomplish that in Visual Studio using VSS?

A: 

If you're talking of any build created by any developer, then the answer is you can't, because even if you know the base revision the binary was created from, you don't know whether the developer had local modifications.

If you're talking about released software: Your binaries should have a version number attached and you should find a label/tag/branch with that version number in your repository. Of course, there's ways to automate this (keyword expansion come to mind, or an automated build script getting the version from the tag name), but in the end it all boils down to these three:

  1. automated builds on a dedicated machine (preferably some GUI that you just throw a tag/label at)
  2. version numbers in binaries
  3. tags/labels/branches for released versions in the SCM.
sbi
I would like to know the base revision the binary was created from.
Jader Dias
If you know any tool that does automated builds, and stamps it with the revision number, please tell.
Jader Dias
Then keyword expansion (probably into a version resource) is the way to go.
sbi
For automated builds, basically all you need is a build script that you start passing a tag name. It's easy to hide that behind some HTML page. If you want to be fancy, provide some means to pick a tag, otherwise have the invoker paste it into an input field.
sbi
+2  A: 

As Dave has answered: " You could put $VERSION$ or something alike in a header file to have it accessible by the code. It should work with any svn client. Here's some more info on it: http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html "

Jader Dias