Hi Julian, On Thu, 2011-01-06 at 14:22 +0000, Julian Foad wrote:
> > Please let me know if I am not clear at any point. > > The tabular format is good but it would be easier to follow if instead > of "A" or "B" or "C" etc. you write "Shown as diff against source" or > "Shown as all lines added". > Thank you for your valuable suggestion :) I have added a modified tabular summary in the file attached with this mail. > Why are some of your tests testing deletes, not adds? > > $ svn diff -r2:1 > Index: copiedfile1 > =================================================================== > --- copiedfile1 (revision 2) > +++ copiedfile1 (revision 1) > @@ -1,5 +0,0 @@ > -1 > -2 > -3 > -4 > -5 > I have shown tests for 'adds' as well as 'deletes' to show the 'diff' behaviour. And with context to the above shown 'diff', clearly, the 'copiedfile1' was just a 'svn copy' of the file 'file1' from revision1, meaning that it has no diff content. That's why I opted to show the deletion in this case and a few similar cases. :) > I seem to recall that the result sometimes depends on whether the target > of the diff command is the actual file or a directory that contains the > file. In other words, "svn diff ./" may behave differently from "svn > diff copiedfile1". Can you test that too please? > Sure Julian, I'll test it. :) I tested it and I don't see any 'behavioural' change in the diffs. Here is what I got with this patch... :) $ svn diff -r1:3 copiedfile2 Index: file1 =================================================================== --- file1 (.../file1) (revision 1) +++ file1 (.../copiedfile2) (revision 3) @@ -3,3 +3,6 @@ 3 4 5 +6 +7 +8 $ svn diff -r1:3 ./ Index: copiedfile2 =================================================================== --- copiedfile2 (revision 2) +++ copiedfile2 (revision 3) @@ -3,3 +3,6 @@ 3 4 5 +6 +7 +8 Thanks and regards Prabhu
-------------------------------------------------- | WC - WC | REPOS - WC | REPOS - REPOS | |---------+------------+---------------+--------------+---------------+-------------------+ | | | | | | | | | | only diff | N/A | all adds | all adds | | | BEFORE |---------------+--------------+---------------+-------------------+ | | | | | | | | | | with '--sca' | all adds | all adds | all adds | |COPIED +------------+---------------+--------------+---------------+-------------------+ | | | | | | | | | | only diff | N/A | all adds | all adds | | | AFTER |---------------+--------------+---------------+-------------------+ | | | | | | | | | | with '--sca' | all adds | all adds | all adds | +---------+------------+---------------+--------------+---------------+-------------------+ +---------+------------+---------------+--------------+---------------+-------------------+ | | | | | | | | | | only diff |against source| all adds | all adds | | | BEFORE |---------------+--------------+---------------+-------------------+ | | | | | | | | | | with '--sca' | all adds | all adds | all adds | |COPIED +------------+---------------+--------------+---------------+-------------------+ | & | | | | | | |MODIFIED | | only diff |against source|against source | against source | | | AFTER |---------------+--------------+---------------+-------------------+ | | | | | | | | | | with '--sca' | all adds | all adds | all adds | +---------+------------+---------------+--------------+---------------+-------------------+