Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I store the new SVN revision number in my source code after I commit? (TortoiseSVN)

Is it possible, via TortoiseSVN, to know the SVN rev number you are about to get prior to a commit so that I can put that rev# into the source code comment section?

Perhaps there is a special keyname/variable that I can put into my file that TortoiseSVN will automatically replace with the rev# it's about to commit to?

The motivation behind this is that I can take the latest build and see what SVN rev's it was comprised of by just looking at the source code. It also gives management warm fuzzies.

like image 630
SiegeX Avatar asked Feb 24 '10 19:02

SiegeX


1 Answers

Subversion does support keyword expansion, but you may want to read here before choosing to implementing it.

There are a number of reasons why it's generally a good idea to avoid modifying your committed files with content that is already in SVN. The second link above provides more detail on why this can be a bad idea. But basically, diffs and patches can become problematic.

You also don't need to duplicate the information that Subversion captures because this can be easily obtained via the log command.

like image 167
LBushkin Avatar answered Oct 03 '22 11:10

LBushkin