SVN info shows old Revision # as the Current Revision
I have an SVN repo. When I recently committed a change, the reflected current revision # is 620:
Transmitting file data ...
Committed revision 620.
However, if I then runsvn info
I get the following:
Path: .
URL: http://www.site.com.testing/repos/site.com/trunk
Repository Root: http://svn.server/repos/site.com
Repository UUID: a9c3a166-39f6-4cfb-8622-fd24eb11034b
Revision: 584
Node Kind: directory
Schedule: normal
Last Changed Author: bob
Last Changed Rev: 584
Last Changed Date: 2012-03-26 18:32:55 -0400 (Mon, 26 Mar 2012)
So committing something tells me that the current SVN repo is 620 but svn info
tells me that the current rev is 584. Also svn log
shows 584 as the current (most recent) rev as well.
If I look at the SVN Log via TortoiseSVN in Windows it correctly shows revision 620 as the current revision.
Am I missing something regarding how svn info
and svn log
work?
Likely the svninfo command is showing you the revision of the current working directory, whereas when you commit a changed file or files, then the output of that commit shows the new revision of those files. 584 will be the last changed/updated revision of the folder.
Try running an svn update
on the folder and the re-running svn info
. It should bring the rest of the folder up to 620
What Subversion is showing you is that you've checked out revision 584. The information is taken directly from the .svn/entries
file, and not from the server.
This stems from Subversion's basic design of not requesting information from the repository server whenever possible. It was a decision made to allow users to have a lot of Subversion's power if they happen to be working remotely and have no network connection to the repository server.
- If you do a
svn info
on one of the files just committed, you'll see that file is at revision 620. - If you did a
svn info http://www.site.com.testing/repos/site.com/trunk
, you'll see the last revision was revision 620 because it is talking to the server. - If you did a
svn update
and then asvn info
, you'll see your working directory is at revision 620.
Just a quick question: Did you commit a few files, or did you commit the entire working directory? If you specified in your commit the files that were changed, this would make sense. Subversion wouldn't have known to update the .svn/entries
file in the root of your working directory. However, I've seen this even when I commit all changes. I've taken to doing an svn up whenever I commit all of my changes.
Remember: It's not a bug. It's a feature.