|We don't bite newbies here... much|
Automatic $VERSION updates and subversion tips?by bsb (Priest)
|on Feb 18, 2008 at 06:04 UTC||Need Help??|
bsb has asked for the
wisdom of the Perl Monks concerning the following question:
I'm looking ways to manage $VERSION numbers automatically. I used to use the CVS Revision keyword to fill the version. As I now use svn and svk, a new trick is required.
The most useful thing we've found so far is an E::MM::FAQ example although there's probably more out there (googling subversion, perl and version is a mess). This quote explains some issues with svn and svk:
In SVN, $Revision$ should be the same for every file in the project so they would all have the same $VERSION. CVS and RCS have a different $Revision$ per file so each file will have a differnt $VERSION. Distributed version control systems, such as SVK, may have a different $Revision$ based on who checks out the file leading to a different $VERSION on each machine! Finally, some distributed version control systems, such as darcs, have no concept of revision number at all.The CVS incantation I used to use was:
Subversion has keyword substitution but, as mentioned above, it's handled differently to cvs.What tips do you have a automatically managing version?
What about using $Date$ for versions? eg. 2008.02_18
Is the PBP "use version; qv()" actually a BP?
How are branches best handled?
Are there other ways to update versions, not using the source control system?
Is the attempt to do this automatically flawed?