Svn – how to diff last committed change

To see the diff of last committed change follow these steps:

  1. Find last revision id
    $ svn update
    $ svn log -l 1
    r4546 | user1 | 2016-01-12 15:20:20 +0000 (Tue, 12 Jan 2016) | 2 lines
    some comment
    
  2. Now run the diff command with -c change (e.g. for revision r4546)

    $ svn diff -c r4546
    ## or 
    $ svn diff --diff-cmd=diff -x -U0 -c r4546
    

    Note that -c ARG is equivalent to -r ARG-1:ARG

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments