I’m trying to get the the version number of my code to include in deployment file, but I’m running into a strange situation. I’m not a very avid user of svn so I may be missing some svn subtlety here.
When I run svnversion on the root of my project, or svnversion c:\dev\calculator where c:\dev\calculator is the root of my source code, I get the same result: 17597.
C:\Dev\Calculator>svn update
Updating '.':
At revision 17597.
C:\Dev\Calculator>svnversion
17597
C:\Dev\Calculator>svn info
Path: .
Working Copy Root Path: C:\Dev\Calculator
URL: http://10.168.130.30:8080/read_only/Trunk/Calculator
Repository Root: http://10.168.130.30:8080/read_only
Repository UUID: 9bacaef-544f-534e-b388-4c9dd7c52319
Revision: 17597
Node Kind: directory
Schedule: normal
Last Changed Author: domain\user
Last Changed Rev: 17544
Last Changed Date: 2012-07-19 15:00:36 -0400 (Thu, 19 Jul 2012)
However, when I use TortoiseSVN Repository Browser, I see the Revision column for my “Calculator” folder at 17544. Furthermore, doing a log on the ‘Calculator’ folder shows me the last log entry at rev 17544 and the revision graph also confirms this.
Why the discrepancy? Where is the 17597 number coming from? What is the difference between Last Changed Rev and Revision?
Thanks for the clarification!
Shows the current revision of the working copy, that is the identifier associated to the current state of your whole versioned project.
Shows the revision at which the targeted working directory contents (including subfolders) have been changed the last time.
In your case you called
svn info [TARGET[@REV]...]without the optionaltargetparameter, fromC:\Dev\Calculator>folder.If a
targetparameter is not specifiedsvn infoselects as target the current directory, in your caseC:\Dev\Calculator>.So
svn infois telling you that the latest revision at which\trunk\Calculatorcontents have been modified isrev. 17544.You should note that even if you are calling
svn infoon the working directory mapped to the trunk folder of the svn repository you could have some more recents revisions on branches or tags.