nonopolarity
nonopolarity

Reputation: 150956

How to use svn command line: "svn log -l 3" to show proper history?

I work at a company for contracting work, and they use svn command line and text diff by ssh'ing to the Linux desktop. For the command to show 3 log items:

svn log -l 3

I wonder why it doesn't show the history I just committed? The file is in one of the sub-directories.

So for example, if I do a

svn log -l 3 foo/bar/abc.html

then the log history will show the commit I just did one minute ago. But the first command line I posted, it will only show the log that is 10 days ago and committed by someone else. Is there a way to make it work like Tortoise or Versions, so that it will show the log history for the current directory and down, or for the whole project?

Upvotes: 0

Views: 449

Answers (1)

Ben Reser
Ben Reser

Reputation: 5765

This is because your commit has created a mixed-revision working copy.

See the "Why does svn log Not Show Me What I Just Committed?" section of the svnbook here: http://svnbook.red-bean.com/en/1.7/svn.tour.history.html#svn.tour.history.log

It'll reference the "Updates and commits are separate" section which goes into more details on mixed-revisions.

You can either update your working copy with svn update before running the log command or you can use svn log -l 3 -r HEAD:1 to bypass the default revision range being BASE:1 (and to see the current log without having to update your working copy first).

Upvotes: 1

Related Questions