开发者

Can anyone explain this SVN log output?

开发者 https://www.devze.com 2022-12-16 04:28 出处:网络
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 sh

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开发者_StackOverflow中文版) shows up only if I specify the filename:

svn log -vv ChangedFilename
            r11 ...

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


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.


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...]


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消