tags:

views:

254

answers:

3

Something I don't understand about how SVN displays log output. Suppose I have a project at revision 10. I then alter a subfile in the project, which is now at revision 11. The svn log command now shows me the following:

svn log -vv 
            r10 ...
            ------
            r9 ...
            ------
            r8 ...

However, the lastest change (r11) shows up only if I specify the filename:

svn log -vv ChangedFilename
            r11 ...

Shouldn't r11 show up in the first command as well?

+2  A: 

I see the same behavior as you, if I modify a file, commit it, then re-run log. It appears this behavior goes away once an 'svn update' has occurred on the folder.

Maybe the log isn't updated when you commit, only when you update?

Here is the documentation on svn log (for release 1.5)

You can also get the the log from the repository itself by specifying a URL

svn log URL[@REV] [PATH...]
Joshua McKinnon
Ahh, that makes sense, assuming svn log reads your local record and your global value read by svn log (without the filename) wouldn't get updated until you talk to the server with svn update.
Steve B.
+6  A: 

Explanation is in the handbook:
http://svnbook.red-bean.com/en/1.5/svn.tour.history.html#svn.tour.history.log

Why Does svn log Not Show Me What I Just Committed?

If you make a commit and immediately type svn log with no arguments, you may notice that your most recent commit doesn't show up in the list of log messages. This is due to a combination of the behavior of svn commit and the default behavior of svn log. First, when you commit changes to the repository, svn bumps only the revision of files (and directories) that it commits, so usually the parent directory remains at the older revision (See the section called “Updates and commits are separate” for an explanation of why). svn log then defaults to fetching the history of the directory at its current revision, and thus you don't see the newly committed changes. The solution here is to either update your working copy or explicitly provide a revision number to svn log by using the --revision (-r) option.

Joeri Sebrechts
+1  A: 

Just FYI, I tested using svn 1.6 and an svn update + svn log does in fact work as the documentation states. To avoid having to do an update, try "svn log -r PREV:HEAD" and that should pull down latest logs.

Sam Post