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

'svn diff -rN parent-of-locally-added-file' doesn't show the add

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • 1.7.x
    • unknown
    • None

    Description

      In r1068667 we added diff_tests.py 50 'diff -r1 of dir with removed-then-readded
      file' to cover issue #1675, but the test actually covered a slightly different
      problem, see http://subversion.tigris.org/issues/show_bug.cgi?id=1675#desc7
      
      The problem exposed in diff_tests.py 50 is that 'svn diff -rN' on a directory
      which had a file child deleted in rX (where X>N) doesn't show the local addition
      of a new file in place of the deleted file. 
      
      For example, starting with a vanilla greek tree:
      
        >svn st -v
                         1        1 jrandom      .
                         1        1 jrandom      A
                         1        1 jrandom      A\mu
                         1        1 jrandom      A\B
                         1        1 jrandom      A\B\lambda
                         1        1 jrandom      A\B\E
                         1        1 jrandom      A\B\E\alpha
                         1        1 jrandom      A\B\E\beta
                         1        1 jrandom      A\B\F
                         1        1 jrandom      A\C
                         1        1 jrandom      A\D
                         1        1 jrandom      A\D\gamma
                         1        1 jrandom      A\D\G
                         1        1 jrandom      A\D\G\rho
                         1        1 jrandom      A\D\G\pi
                         1        1 jrandom      A\D\G\tau
                         1        1 jrandom      A\D\H
                         1        1 jrandom      A\D\H\chi
                         1        1 jrandom      A\D\H\omega
                         1        1 jrandom      A\D\H\psi
                         1        1 jrandom      iota
      
      Delete a file and commit the deletion in r2:
      
        >svn del A\D\H\omega
        D         A\D\H\omega
      
        >svn ci -m ""
        Deleting       A\D\H\omega
      
        Committed revision 2.
      
      Create a new in place of the deleted one:
      
        >echo the new omega> A\D\H\omega
      
        >svn add A\D\H\omega
        A         A\D\H\omega
      
      The diff against r1 only show the removal of the deleted file, not that anything
      has taken it's place:
      
        >svn diff -r1
        Index: A/D/H/omega
        ===================================================================
        --- A/D/H/omega (revision 1)
        +++ A/D/H/omega (working copy)
        @@ -1 +0,0 @@
        -This is the file 'omega'.
      
      Where's '  +the new omega'?
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pburba Paul Burba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: