Reputation: 16656
Note: This is probably a no-brainer for experienced SVN users, but it stumped me for quite a while...so here's hoping this will help someone like me!
After issuing svn log
from the command line, I noticed that several recent commit messages were missing. I knew that these messages were correctly saved in my repository because they were showing up in my SVN client (RapidSVN). I just couldn't figure out why they wouldn't be visible using the command line version of svn.
Answer below...
Upvotes: 84
Views: 28129
Reputation: 2973
I hit the same issue today and was horrified thinking I lost my changes.
It happens just because of weirdness of subversion. There is a concept of working copy that is set to the revision that was checked out originally. Working copy revision is not changed by new commits. svn update
is required to update/sync working copy revision to the repository. Not sure I would like to do that in every scenario.
PS: git
is so much better.
Upvotes: 3
Reputation: 2219
You can also explicitly tell svn log to go to the server by specifying the URL of the repository.
e.g.
svn log svn://your-server/trunk
Or more generally and succinctly:
svn log ^/
Upvotes: 1
Reputation: 405
If you would like to see the full log without updating (as I sometimes do when working on an old revision) you can run:
svn log -r HEAD:0
Or, for easier viewing:
svn log -r HEAD:0 | less
Upvotes: 23
Reputation: 16656
The problem had to do with my poor understanding of what svn log
was showing. With no other arguments supplied, it outputs log messages from the working copy of the log, not from the actual repository. Thus, issuing svn update
will bring the working copy up-to-date with the repository, and then svn log
will reflect all recent commits. Duh! ;-)
Upvotes: 130