[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn diff output confusion?

From: Michael Sinz <Michael.Sinz_at_sinz.org>
Date: 2005-10-10 20:21:03 CEST

Greg Hudson wrote:
> On Mon, 2005-10-10 at 12:38 -0400, Michael Sinz wrote:
>
>>Note #1: the double listing of file-1.txt and file-2.txt.
>
>
> A file-deletion followed by a file-add. What's so strange about that?

Well, it was just a set of renames. That is why I thought it was
strange.

So, the reason for this is because of the diff being done on a directory
and it shows all of the changes due to the files being physically
different. (file-1.txt in r16 becomes file-5.txt and then file-2.txt)

But if I do a diff on each of the individual files in the directory
the results are different - for example:

svn diff --notice-ancestry -r 16:30 http://svn.code-host.net/svn/example/trunk/tests/TestCase-mv/file-1.txt@30

Index: file-2.txt
===================================================================
--- file-2.txt (.../file-2.txt) (revision 16)
+++ file-2.txt (.../file-1.txt) (revision 30)
@@ -1 +1,3 @@
-Thu Oct 6 07:35:09 EDT 2005
+Mon Oct 10 12:02:47 EDT 2005
+Mon Oct 10 12:04:16 EDT 2005
+Mon Oct 10 12:05:15 EDT 2005
------------------------------------------------------------------------

Note that it says that the diff is for file-2.txt (which is acceptable
since it is file-2.txt that becomes file-1.txt at the end)

So, the question is why the difference in output when doing the directory
diff rather than the file diff?

Maybe this really belongs in users, but given the talk about diff behaviors,
I thought I would bring this up.

>>Note #3: this does not happen if I don't include the "--notice-ancestry"
>> option.
>
> Well, yes; without the --notice-ancestry flag, we treat the same
> situation as a file modification because the unrelated files have the
> same pathname. That's what the flag is for.

Ahh, but it does not say that there was a file change in the output
(unlike the file diff that does show the name changes)

-- 
Michael Sinz                     Technology and Engineering Director/Consultant
"Starting Startups"                                mailto:michael.sinz@sinz.org
My place on the web                            http://www.sinz.org/Michael.Sinz
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 10 20:22:25 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.