On Wed, 05 Oct 2011, Konstantin Kolinko wrote:
Can "diff -u" command take input from stdout?

From stdin? Yes, in all diff implementations I have seen on unix-like systems.

In answer to the original question, I suggest this approach:

    parse the output from "svn log -q -r 1:HEAD $URL" to
    get a list of revision numbers in which the URL was modified.

    For each such revision number, save the output from

       svn cat -r $REVISION $URL | diff -U3 - $FILE

    Find the smallest of those saved diff outputs, and it probably
    corresponds to the version that was originally checked out.

--apb (Alan Barrett)

Reply via email to