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

Local diff of copied dir shows all props added

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 21 Aug 2014 12:19:27 +0100

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
Received on 2014-08-21 13:19:58 CEST

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.