Using the SVN command line, is there a way to show the last X number of commits along with commit messages, in reverse-chronological order (newest commit first)?
Asked
Active
Viewed 1e+01k times
4 Answers
195
svn log --limit 10
or
svn log -l 10
Further googling uncovered the answer. svn log
lists in reverse-chronological order by default.

Trufa
- 39,971
- 43
- 126
- 190

Lokesh Dhakar
- 5,289
- 5
- 22
- 24
-
17SVN has really useful built-in help. `svn help log` would probably be even faster than a Google search. – user229044 Apr 20 '10 at 14:13
-
3This command seems to return only the last but one(not the latest) commit messages. For eg the latest commit is r901 but it returns only till r900. Just wanted to check if this was the standard or an error. Also `svn log -l10
` would return the latest(r901) also. – Shyam K Dec 05 '12 at 04:38 -
This isn't the right answer, this wont show the latest commits, and that could be very misleading. – Owl Dec 04 '20 at 03:15
27
To clarify the previous answers - note that svn log
by default only shows the commits up to the revision of your working copy (latest svn update
, run svn info
to see). So yes, if it's OK for you to download all commits first, this combination will work:
svn update
svn log -l 10
However, I'm mostly interested in showing the ALL latest commits without first updating my working copy, so I mostly compare my log to HEAD falling:
svn log -l 10 -r HEAD:1
It makes a huge difference to me.

Paul Rooney
- 20,879
- 9
- 40
- 61

Jens X Augustsson
- 1,214
- 12
- 13
24
A shortcut -l
exists for --limit
# show last 10 logs
svn log -l 10
22
To see them in chronological order:
svn log -r1:HEAD

yegor256
- 102,010
- 123
- 446
- 597
-
This is the correct answer, the other answers don't show my latest commits. – Owl Dec 04 '20 at 03:13