You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2014/08/21 13:19:27 UTC

Local diff of copied dir shows all props added

Locally copying an (unmodified) dir with properties results in a wrong local diff output. 

[[[
$ svn cp tools/hook-scripts/mailer hs
A         hs

$ svn st
A  +    hs

$ svn diff hs/
### (prints a bunch of diff headers for unchanged files
### and then...)

Index: hs
===================================================================
--- hs    (nonexistent)
+++ hs    (working copy)

Property changes on: hs
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+mailer.conf
]]]

The worst part of this output is at the end where it shows an all-properties-added diff for the directory "hs".

This seems to be an error in svn_wc__diff_local_only_dir() -- it passes NULL as the copy-from source and NULL as the copy-from propswhen it calls processor->dir_added().

I looked at the corresponding function for files, svn_wc__diff_local_only_file(), and that jumps through some hoops to fetch the 'pristine' props to use as copy-from props, and was tempted to just copy and paste code from there but I couldn't completely follow what it's doing.

Anyone else want to take a look at it?

(This is with current trunk; running the 'svn diff hs/' with 1.8.0 and 1.8.10 also gives a similar result.)

- Julian


Re: Local diff of copied dir shows all props added

Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> Bert Huijben wrote:
>>  Julian Foad wrote:
>>>   OK, seems to be fixed by copy-n-paste in r1619380.
>> 
>>  Patch looks good.
>> 
>>  How hard would it be to tweak your test for inclusion in the testsuite?
> 
> Done in r1619393.
> 
>>  I'm wondering when we introduced this problem... 1.7, 1.8, 1.0?
>>  (Especially since I'm probably to blame if it is since 1.7+)
> 
> 1.7(.10) works fine; it's broken since 1.8.0.

I've nominated it for backport to 1.8.x.

- Julian


Re: Local diff of copied dir shows all props added

Posted by Julian Foad <ju...@btopenworld.com>.
Bert Huijben wrote:
> Julian Foad wrote:
>>  OK, seems to be fixed by copy-n-paste in r1619380.
> 
> Patch looks good.
> 
> How hard would it be to tweak your test for inclusion in the testsuite?

Done in r1619393.

> I'm wondering when we introduced this problem... 1.7, 1.8, 1.0?
> (Especially since I'm probably to blame if it is since 1.7+)

1.7(.10) works fine; it's broken since 1.8.0.

> The diff tests could use a lot more corner case coverage.

- Julian

RE: Local diff of copied dir shows all props added

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad@btopenworld.com]
> Sent: donderdag 21 augustus 2014 14:57
> To: Subversion Development
> Cc: Bert Huijben
> Subject: Re: Local diff of copied dir shows all props added
> 
> OK, seems to be fixed by copy-n-paste in r1619380.

Patch looks good.

How hard would it be to tweak your test for inclusion in the testsuite?

I'm wondering when we introduced this problem... 1.7, 1.8, 1.0?
(Especially since I'm probably to blame if it is since 1.7+)


The diff tests could use a lot more corner case coverage.

	Bert


Re: Local diff of copied dir shows all props added

Posted by Julian Foad <ju...@btopenworld.com>.
OK, seems to be fixed by copy-n-paste in r1619380.

- Julian


Julian Foad wrote:
> Locally copying an (unmodified) dir with properties results in a wrong local 
> diff output. 
> 
> [[[
> $ svn cp tools/hook-scripts/mailer hs
> A         hs
> 
> $ svn st
> A  +    hs
> 
> $ svn diff hs/
> ### (prints a bunch of diff headers for unchanged files
> ### and then...)
> 
> Index: hs
> ===================================================================
> --- hs    (nonexistent)
> +++ hs    (working copy)
> 
> Property changes on: hs
> ___________________________________________________________________
> Added: svn:ignore
> ## -0,0 +1 ##
> +mailer.conf
> ]]]
> 
> The worst part of this output is at the end where it shows an 
> all-properties-added diff for the directory "hs".
> 
> This seems to be an error in svn_wc__diff_local_only_dir() -- it passes NULL as 
> the copy-from source and NULL as the copy-from propswhen it calls 
> processor->dir_added().
> 
> I looked at the corresponding function for files, 
> svn_wc__diff_local_only_file(), and that jumps through some hoops to fetch the 
> 'pristine' props to use as copy-from props, and was tempted to just copy 
> and paste code from there but I couldn't completely follow what it's 
> doing.
> 
> Anyone else want to take a look at it?
> 
> (This is with current trunk; running the 'svn diff hs/' with 1.8.0 and 
> 1.8.10 also gives a similar result.)
> 
> - Julian
>