Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-1493

Property Diffs/Merges Should Use libsvn_diff

    Details

      Description

      The code for output differences between properties is currently manually 
      constructing unified diff output with the a - in front of the previous value and a 
      + in front of the new value.  This looks ok for one line properties, but is silly 
      when applied to multiline properties like svn:ignore.
      
      What we should be doing is making the output use libsvn_diff, since it already 
      knows how to make unified diff output.
      
      Unfortunately, libsvn_diff is currently quite tied to the idea that it's diffing two 
      files.  It's not all that hard to generate an svn_diff_t from two arbitrary 
      buffers (you just need to replace the datasource_open callback with something 
      that doesn't try to read from on disk files), but the code that prints out unified 
      diff output is rather more attached to the idea that it is working with files on 
      disk, and making it not do that without duplicating a lot of code looks 
      nontrivial to me (of course I know very little about libsvn_diff, so I might be 
      missing something).
      
      At the moment that leaves us with two options, write the property values out 
      to files (ick, hiss, boo!), or teach libsvn_diff to work with in-memory buffers.
      
      Oh, for anyone who's read this far who has admin access to 
      subversion.tigris.org, we don't currently have a subcomponent for libsvn_diff.
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rooneg Garrett Rooney
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: