[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-issues
Subject:    [Issue 4460] New - diff against a file between repo and wc with properties fails
From:       breser () tigris ! org
Date:       2014-01-08 19:37:38
Message-ID: iz4460 () subversion ! tigris ! org
[Download RAW message or body]

http://subversion.tigris.org/issues/show_bug.cgi?id=4460
                 Issue #|4460
                 Summary|diff against a file between repo and wc with propertie
                        |s fails
               Component|subversion
                 Version|1.7.x
                Platform|Macintosh
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|libsvn_client
             Assigned to|issues@subversion
             Reported by|breser






------- Additional comments from breser@tigris.org Wed Jan  8 11:37:37 -0800 2014 -------
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
check).

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
A    vl-tests2/mpfrtests.data
A    vl-tests2/mpfrtests.sh
A    vl-tests2/release-3.1.2-p4
A    vl-tests2/release-3.1.0-p8
A    vl-tests2/vfy-data
A    vl-tests2/ReadMe
Checked out revision 8727.
$ cd vl-tests
$ svn diff -r 8276 ReadMe
Index: 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
Index: ReadMe
===================================================================
--- ReadMe	(revision 8726)
+++ ReadMe	(working copy)

Property changes on: ReadMe
___________________________________________________________________
]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=463&dsMessageId=3071363

To unsubscribe from this discussion, e-mail: [issues-unsubscribe@subversion.tigris.org].
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic