Get changed files from SVN command line between two revisions

64,485

Solution 1

Try svn diff -r 5000:6001 instead. To understand this, consider the following: what would the output of svn diff -r 100:100 look like? It would show no changes, because the revisions are the same. To see the changes for revision 100, we must use -r 99:100.

Solution 2

Try svn log -r 5000:6001 -v to get the list of files. This gives list of files categorized by revision no. So, one can have better idea on what files went in what revision at a glance.

Solution 3

Dirk-Willem van Gulik's answer is perfect if you want all changes. However if you want only the list of files changed append --summarize switch to your command,

svn diff -r 13447:HEAD

Solution 4

svn diff -r v1:v2 --summarize | awk '{print $2}' > filelist.txt

Explanation:

svn diff -r v1:v2 --summarize provides you the status and the name of the file separated by a tab character. You need to select the string after the tab character - the second field. You can do that using awk and redirect the output to filelist.txt

Share:
64,485
Madhan
Author by

Madhan

Updated on May 05, 2020

Comments

  • Madhan
    Madhan about 4 years

    I need to get the changed files list between two revisions in SVN.

    I have used the following command:

    svn diff -r 5001:6001 --summarize https://svn.blah.com/../  > output.txt
    

    For some reason, the files modified on revision 5001 are not populated in the output text file.

    What is the exact command to extract the files list between the two revisions (inclusive of from and to revisions, that is, including revision 5001 and revision 6001)?

  • Dirk-Willem van Gulik
    Dirk-Willem van Gulik over 12 years
    Right - as there is no difference between 100 and 100 - they are identical. By definition. Hence if you want to know the difference in your 5001:6001 inclusive of 5001 one needs to do a -r 5000:6001.
  • Tony Adams
    Tony Adams over 10 years
    I needed a list of the files that had changed between two arbitrary revisions and this worked for me, while the diff -r suggestion, with --summarize or not listed all the files in the repo. Perhaps I'm missing something?
  • Chrismas007
    Chrismas007 over 9 years
    Can you add some explanation as to why this solves the user's problem?
  • MattSaw
    MattSaw almost 8 years
    Be careful about the output of this when there are revisions coming from merges. Experience an issue today where the output looked like /branch/abc/new_file.js (from trunk/new_file.js:12344). In my experience you are always better of using --xml if you are planning consuming this data as the input of something else.