Running a diff against a file target with one repository path and one wc path
fails if the file has a svn:mime-type property set and will produce spurious
differences if any other properties (or --force is set to bypass the binary type
This is really two separate issues, but I'll handle them as one for the purposes
of this. Both issues were created by the fixes introduced in 1.7.14 for issues
#4153 and #4421. Specifically the diff_repos_wc_file_target() function.
1) The code is using the hash containing the properties as though the values are
char pointers when they are actually pointers to a svn_string_t (C string vs
counted length string). This causes the property to be passed into the diff
code with a garabage mimetype which makes the code believe the file is binary.
This particular issue also slipped into the
diff_repos_repos_added_or_deleted_file() function as well.
2) The calls to the file_changed callback are providing the wrong data for the
propchanges argument. This should be the difference between the source and
targets files properties. But instead it constructs the array as the entire
state of the target properties. Which causes the underlying code to act as
though there is a difference, but then it ends up printing an empty difference.
A reproduction recipe for this is:
Given the repository svn://scm.gforge.inria.fr/svn/mpfr/misc/vl-tests:
$ svn co $repo
Checked out revision 8727.
$ cd vl-tests
$ svn diff -r 8276 ReadMe
Cannot display: file marked as a binary type.
svn: E000022: Valid UTF-8 data
(hex: 73 76 6e 3a 6d 69 6d 65 2d 74 79 70 65 20 3d 20 28 48 67)
followed by invalid UTF-8 sequence
(hex: fb 20 0a 7f)
$ svn diff -r 8726 ReadMe --force
--- ReadMe (revision 8726)
+++ ReadMe (working copy)
Property changes on: ReadMe