svn log 不会显示刚刚提交的内容

 

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 第 3.5.1 节 “更新和提交是分开的” 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.

如果刚刚提交就用svn log命令,则不会显示刚刚提交的内容。因为svn commit操作与svn log操作之间的联系,当提交的时候,只会改变当前文件或目录的版本号,svn log会抓取当前版本,而不会管新提交的。可以先svn update 再查看或用类似svn log -r 8 -v来查看。

发表评论

电子邮件地址不会被公开。 必填项已用*标注