Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see the last 10 commits in reverse-chronological order with SVN?

Tags:

commit

svn

People also ask

How can I see svn commit history?

To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.

Where is svn history stored?

They are stored in the svn:log property. You can add the --revprop flag to the various property commands to view & edit this property.

Does svn allow editing changeset for specific commit in history?

By default, the log message property (svn:log) cannot be edited once it is committed. That is because changes to revision properties (of which svn:log is one) cause the property's previous value to be permanently discarded, and Subversion tries to prevent you from doing this accidentally.


svn log --limit 10

or

svn log -l 10

Further googling uncovered the answer. svn log lists in reverse-chronological order by default.


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.


A shortcut -l exists for --limit

# show last 10 logs
svn log -l 10

To see them in chronological order:

svn log -r1:HEAD