Search code examples
delphiversion-controlversioningdelphi-2010

Delphi 2010: how to stamp file version in *.pas and increment it on each save w/o CVS/SVN tools?


How do I have in each *.pas file it's version, incrementing on each save in some comment line? I have plenty of files on three PCs and I need to have a possibility to quickly check their versions against each other.

This problem is easily solved by some centralized version control, but some sources I have cannot be trusted to external servers and are kept on TrueCrypt volumes.

May be some addon can do that for me? Something like changing $Version: to $Version: 121212 on each save, incrementing this value?

May be there is another way also of solving this problem?


Solution

  • Read this chapter about keyword substitution in Subversion.

    In short: you have to enable keyword substitution for your files via svn propset svn:keywords ... and insert the revision keyword in these files.