rpg
rpg

Reputation: 1652

How does the SVN version update for Perl modules

I did not write this code. This code was written by client but now at the client, nobody knows about it. It's legacy code. Those who wrote it already left.

Here is the line I don't understand:

push(@versions, __PACKAGE__ . ' ($Revision: 37638 $)');

Whenever I make any change to this module and commit the code to SVN, the revision number is automatically updated. I don't understand how this happens. Can someone please help me to figure it out?

Upvotes: 0

Views: 269

Answers (1)

Brian Agnew
Brian Agnew

Reputation: 272247

This is using SubVersion keyword substitution

Subversion has the ability to substitute keywords—pieces of useful, dynamic information about a versioned file—into the contents of the file itself. Keywords generally provide information about the last modification made to the file. Because this information changes each time the file changes, and more importantly, just after the file changes, it is a hassle for any process except the version control system to keep the data completely up-to-date. Left to human authors, the information would inevitably grow stale.

It looks like you're using the Revision keyword:

Revision

This keyword describes the last known revision in which this file changed in the repository, and looks something like $Revision: 144 $. It may also be specified as LastChangedRevision or Rev

Upvotes: 4

Related Questions