svntortoisesvnversion-control-keywords

How do I use global revision number keyword with TortoiseSVN?


In CVS you can use keywords in your code that are expanded when checking the files out. I'd like to display the global revision as CVS has with the $GlobalRev$ keyword.

Subversion has the $Rev$ command but it only shows the latest revision that the file was changed. I know there is a svnversion command that has as of right now no documentation what so ever in 1.5 and 1.6 nightly.

I'm interested to know how to do this with TortoiseSVN.


Solution

  • svnversion is still available, and is documented in 1.5

    svnversion is a program for summarizing the revision mixture of a working copy. The resultant revision number, or revision range, is written to standard output.

    Use this to get the revision of your working copy after you've checked it out, the documentation for KeywordExpansion describes how its designed to be used.