0

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?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
  • Not "the" answer, but: does VSS support variable expansion like CVS/SVN? So you could put $VERSION$ or something alike in a header file to have it accessible by the code. – Dave Vogt Oct 28 '09 at 16:43
  • I also use SVN. Does this $VERSION$ tag works with Visual Studio + AnkhSVN? Or with TortoiseSVN? – Jader Dias Oct 28 '09 at 16:46
  • 2
    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 – Dave Vogt Oct 28 '09 at 16:56

2 Answers2

2

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
  • 88,211
  • 155
  • 421
  • 625
0

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
  • 219,715
  • 46
  • 258
  • 445
  • I would like to know the base revision the binary was created from. – Jader Dias Oct 28 '09 at 16:56
  • If you know any tool that does automated builds, and stamps it with the revision number, please tell. – Jader Dias Oct 28 '09 at 16:57
  • Then keyword expansion (probably into a version resource) is the way to go. – sbi Oct 28 '09 at 16:57
  • 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 Oct 28 '09 at 16:59