svn diff for a complete file?

diff, svn

Solution

Without temp file:

echo "" | diff -u - script.pl

Problem

Given: an SVN repository, a `bin` directory inside it and a `script.pl` inside this `bin`. Some revisions ago, `bin` and `script.pl` has been added to the repository in one commit. Since then, some revisions has been applied to `script.pl`. Needed: a diff command which would return a complete diff for `script.pl` from zero to HEAD, i.e. a diff with all lines added. Background: this diff is needed for code review, for feeding to ReviewBoard Problem: `svn diff` with `-r X:HEAD` (`X` being the first revision of `script.pl`) produces a diff between the first version and HEAD while `-r X-1:HEAD` tell me the file `script.pl` is unknown in the revision `X-1`, which is actually correct. However, I can't find a proper solution which would include the diff from an empty file. I also can't diff the `bin` directory, since it has been added in the same commit as `script.pl` Solution: ?

Original source