In order to view changes or diffs between commits, i use the following from the command line:
svn diff -r 3000:3025 > daychanges.diff
I want to modify the command so that it generates diffs between successive commits, concatenates them and outputs to file, something like
svn diff -r 3000:3001 > daychanges.diff
svn diff -r 3001:3002 >> daychanges.diff
svn diff -r 3002:3003 >> daychanges.diff
...
svn diff -r 3019:3020 >> daychanges.diff
how can i write such a script?
You can write
forloops in bash:http://www.cyberciti.biz/tips/how-to-generating-print-range-sequence-of-numbers.html
Given that, it shouldn’t be all that difficult to write a script that calls
svn diffover a range of commits.In a single line command, that could be run from the CLI:
or if you prefer, the shorter version,
In a multi-line script:
(Omit the
> $outfileif you just want to manually direct the output of the script.)