Typing svn log
spits out an incredibly long, useless list on a command line. I have no idea why that is the default. If I wanted to read (or even could read) 30
I like to use -v
for verbose mode.
It'll give you the commit id, comments and all affected files.
svn log -v --limit 4
Example of output:
I added some migrations and deleted a test xml file ------------------------------------------------------------------------ r58687 | mr_x | 2012-04-02 15:31:31 +0200 (Mon, 02 Apr 2012) | 1 line Changed paths: A /trunk/java/App/src/database/support A /trunk/java/App/src/database/support/MIGRATE A /trunk/java/App/src/database/support/MIGRATE/remove_device.sql D /trunk/java/App/src/code/test.xml
To add to what others have said, you could also create an alias in your .bashrc or .bash_aliases file:
alias svnlog='svn log -l 30 | less'
or whatever you want as your default
This answer is directed at further questions regarding Subversion subcommands options. For every available subcommand (i.e. add, log, status ...), you can simply add the --help
option to display the complete list of available options you can use with your subcommand as well as examples on how to use them. The following snippet is taken directly from the svn log --help
command output under the "examples" section :
Show the latest 5 log messages for the current working copy
directory and display paths changed in each commit:
svn log -l 5 -v
Pipe the output through less
or other pager:
svn log | less
As you've already noticed svn log command ran without any arguments shows all log messages that relate to the URL you specify or to the working copy folder where you run the command.
You can always refine/limit the svn log
results:
In case anybody is looking at this old question, a handy command to see the changes since your last update:
svn log -r $(svn info | grep Revision | cut -f 2 -d ' '):HEAD -v
LE (thanks Gary for the comment)
same thing, but much shorter and more logical:
svn log -r BASE:HEAD -v