Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking for a strategy to version an application with the following requirements.

My requirements are given an exe with version number (major.minor.build-number)

1) I want to map the version to a svn source revision that made the exe

2) With the source and exe I should be able to attach and debug in vs2010 with no issue.

3) Once I check-out the source code for the exe I should be able to build the exe again with the version number without having to make any changes to a file.

share|improve this question
2  
This is really a duplicate of Embedding SVN Revision number at compile time in a Windows app over on stack overflow, though this answer doesn't fulfill all of your requirements. It can be done easily with mercurial though and with more effort with git. With both of these DVCSs you can guarantee that the whole working directory is in a specific state. With svn you are never sure if all working directories have been updated to the expected revision. –  Mark Booth Sep 20 '12 at 16:05
    
@MarkBooth Thanks I'll check that out and see if I can adapt the solution to fit my requirements. –  ahenderson Sep 20 '12 at 16:28
add comment

1 Answer

up vote 1 down vote accepted

Side note:

While building app from not-modified WC (and, probably, from not-sparse checkout) is human task, you can move task of supporting link to SVN

Alternatives

  • Use tags and after creating release (X.Y.Z from revision NNN) in trunk or any branch copy this WC (or repo-tree) to tag X.Y.Z. Later you can always return back to any release by checkout corresponding tag
  • Use custom SVN properties (svn help propset, 1-st type: versioned property) on any always-must-have solution file for storing version-string and change this property (and commit only this change) after release by next commit. In order to find needed revision in this case you have to inspect log of signal-file, find needed revision, checkout "found" or "found-1" revision

PS: Mention of VS means that you can use SubWCRev for getting global repository-wide data on build-stage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.