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

Deleting a branch that has been switched to doesn't bring back the original target

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.x
    • Fix Version/s: 1.7.9
    • Component/s: libsvn_wc
    • Labels:
      None

      Description

      $ svnadmin create repos
      
      $ svn mkdir --parents file:///%CD%/repos/A/B/C -m ""
      
      $ svn cp file:///%CD%/repos/A file:///%CD%/repos/AA -m ""
      
      $ svn co file:///%CD%/repos/A A
      
      $ svn switch ^/AA/B A/B
      
      $ svn rm file:///%CD%/repos/AA
      
      $ svn up A
      
      
      
      This will remove the directory B from A. Future updates of A won't bring back 
      A/B.
      
      
      
      Workaround:
      
      $ svn up A/B
      
      
      
      
      
      $ svn co file:///%CD%/repos
      
      svntest.main.run_svn(None, 'cp', sbox.repo_url + '/A',
      
                                         sbox.repo_url + '/AA', '-m', 'Q')
      
      
      
        svntest.main.run_svn(None, 'co', sbox.repo_url + '/A', sbox.wc_dir)
      
        svntest.main.run_svn(None, 'switch', sbox.repo_url + '/AA/B', sbox.wc_dir 
      + '/B')
      
      
      
        svntest.main.run_svn(None, 'rm', sbox.repo_url + '/AA/B', '-m', 'Q')
      
      
      
        expected_output = svntest.wc.State(wc_dir, {
      
          'B'                 : Item(status='D '),
      
        })
      
        expected_status = svntest.wc.State(wc_dir, {
      
          ''                  : Item(status='  ', wc_rev='3'),
      
          'D'                 : Item(status='  ', wc_rev='3'),
      
          'D/G'               : Item(status='  ', wc_rev='3'),
      
          'D/G/rho'           : Item(status='  ', wc_rev='3'),
      
          'D/G/pi'            : Item(status='  ', wc_rev='3'),
      
          'D/G/tau'           : Item(status='  ', wc_rev='3'),
      
          'D/H'               : Item(status='  ', wc_rev='3'),
      
          'D/H/omega'         : Item(status='  ', wc_rev='3'),
      
          'D/H/chi'           : Item(status='  ', wc_rev='3'),
      
          'D/H/psi'           : Item(status='  ', wc_rev='3'),
      
          'D/gamma'           : Item(status='  ', wc_rev='3'),
      
          'C'                 : Item(status='  ', wc_rev='3'),
      
          'mu'                : Item(status='  ', wc_rev='3'),
      
        })
      
      
      
        # Before r1435684 the inherited properties code would try to fetch
      
        # inherited properties for ^/AA/B and fail.
      
        #
      
        # The inherited properties fetch code would then bail and forget to reset
      
        # the ra-session URL back to its original value.
      
        #
      
        # After that the update code (which ignored the specific error code) was
      
        # continued the update against /AA/B (url of missing switched path)
      
        # instead of against A (the working copy url).
      
      
      
        # This update removes 'A/B', since its in-repository location is removed.
      
        svntest.actions.run_and_verify_update(wc_dir,
      
                                              expected_output,
      
                                              None,
      
                                              expected_status)
      
      
      
        expected_output = svntest.wc.State(wc_dir, {
      
          'B'          : Item(status='A '),
      
          'B/lambda'   : Item(status='A '),
      
          'B/E'        : Item(status='A '),
      
          'B/E/alpha'  : Item(status='A '),
      
          'B/E/beta'   : Item(status='A '),
      
          'B/F'        : Item(status='A '),
      
        })
      
        expected_status = svntest.wc.State(wc_dir, {
      
          ''                  : Item(status='  ', wc_rev='3'),
      
          'D'                 : Item(status='  ', wc_rev='3'),
      
          'D/G'               : Item(status='  ', wc_rev='3'),
      
          'D/G/rho'           : Item(status='  ', wc_rev='3'),
      
          'D/G/pi'            : Item(status='  ', wc_rev='3'),
      
          'D/G/tau'           : Item(status='  ', wc_rev='3'),
      
          'D/H'               : Item(status='  ', wc_rev='3'),
      
          'D/H/omega'         : Item(status='  ', wc_rev='3'),
      
          'D/H/chi'           : Item(status='  ', wc_rev='3'),
      
          'D/H/psi'           : Item(status='  ', wc_rev='3'),
      
          'D/gamma'           : Item(status='  ', wc_rev='3'),
      
          'B'                 : Item(status='  ', wc_rev='3'),
      
          'B/E'               : Item(status='  ', wc_rev='3'),
      
          'B/E/alpha'         : Item(status='  ', wc_rev='3'),
      
          'B/E/beta'          : Item(status='  ', wc_rev='3'),
      
          'B/F'               : Item(status='  ', wc_rev='3'),
      
          'B/lambda'          : Item(status='  ', wc_rev='3'),
      
          'C'                 : Item(status='  ', wc_rev='3'),
      
          'mu'                : Item(status='  ', wc_rev='3'),
      
        })
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rhuijben Bert Huijben
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: