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

Diff WC-WC displays wrong base rev for a child with only prop changes

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • trunk
    • 1.9.0
    • libsvn_client
    • None

    Description

      Diff can print the wrong WC base revision when it displays a property change for
      a node that isn't the root directory of the diff.  Here is an illustration,
      using svn 1.7.0-rc2, with an external diff program configured.  Notice it says
      "revision 2" in the text-change header and "revision 1" in the prop-change header:
      
      [[[
      $ svn diff wc
      Index: wc/iota
      ===================================================================
      --- wc/iota	(revision 2)
      +++ wc/iota	(working copy)
      @@ -0,0 +1 @@
      +foo
      Index: wc/iota
      ===================================================================
      --- wc/iota	(revision 1)
      +++ wc/iota	(working copy)
      
      Property changes on: wc/iota
      ___________________________________________________________________
      Added: svn:keywords
      ## -0,0 +1 ##
      +Id
      ]]]
      
      This bug is seen when a diff header is printed specifically for the prop change,
      which happens for a child that has only a property change, and also when using
      an external diff program to display the text content change.
      
      The problem is we don't pass the revision numbers to
      diff.c:diff_props_changed(); it just uses the diff-root revision numbers.
      Part of the problem is that the diff callbacks 'dir props changed'
      method doesn't pass the revnums.  The 'file added' and 'file changed'
      methods do, so at least we can easily fix this for files.
      
      I added an XFail test for this issue in r1166101.
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            julianfoad Julian Foad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment