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

update which tries to delete cwd should fail gracefully

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: 1.10-consider
    • Component/s: unknown
    • Labels:
      None

      Description

      In 1.6 if we attempted to update the cwd to a revision where the cwd's
      repository location no longer exists we received a relatively helpful error:
      
      1.6.20>svn st -v
                     473      473 user         .
                     473      473 user         src
                     473      470 user         src\button.c
                     473      473 user         src\whole.c
                     473      374 user         src\real.c
                     473      470 user         src\main.c
                     473      470 user         FAQ
                     473      470 user         Makefile
                     473      470 user         README
                     473      470 user         doc
                     473      470 user         doc\INSTALL
      
      1.6.20>svn log -v -rHEAD ^^/
      ------------------------------------------------------------------------
      r474 | jrandom | 2013-02-26 15:47:47 -0500 (Tue, 26 Feb 2013) | 1 line
      Changed paths:
         D /calc/branches/my-calc-branch
      
      Removing obsolete branch of calc project.
      ------------------------------------------------------------------------
      
      1.6.20>svn up
      svn: Target path '/calc/branches/my-calc-branch' does not exist
      
      ### On trunk@1450231 we get the same error *if* the cwd is the root
      ### of the WC:
      
      $ svn up
      Updating '.':
      ..\..\..\subversion\svn\update-cmd.c:175: (apr_err=160005)
      ..\..\..\subversion\libsvn_client\update.c:641: (apr_err=160005)
      ..\..\..\subversion\libsvn_client\update.c:581: (apr_err=160005)
      ..\..\..\subversion\libsvn_client\update.c:441: (apr_err=160005)
      ..\..\..\subversion\libsvn_wc\adm_crawler.c:857: (apr_err=160005)
      ..\..\..\subversion\libsvn_ra_serf\update.c:2893: (apr_err=160005)
      ..\..\..\subversion\libsvn_ra_serf\util.c:950: (apr_err=160005)
      svn: E160005: Target path '/calc/branches/my-calc-branch' does not exist
      
      ### But if the cwd is a proper subdirectory of the WC then things are
      ### far less friendly.
      ###
      ### In 1.7:
      
      1.7.9-dev>svn st -v
                     473      473 user         .
                     473      470 user         FAQ
                     473      470 user         Makefile
                     473      470 user         README
                     473      470 user         doc
                     473      470 user         doc\INSTALL
                     473      473 user         src
                     473      470 user         src\button.c
                     473      470 user         src\main.c
                     473      374 user         src\real.c
                     473      473 user         src\whole.c
      
      1.7.9-dev>svn up
      Updating '.':
      ..\..\..\subversion\svn\update-cmd.c:163: (apr_err=720032)
      ..\..\..\subversion\libsvn_client\update.c:615: (apr_err=720032)
      ..\..\..\subversion\libsvn_client\update.c:556: (apr_err=720032)
      ..\..\..\subversion\libsvn_client\update.c:417: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\update.c:2413: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\update.c:2413: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1919: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1919: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1662: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1379: (apr_err=720032)
      ..\..\..\subversion\libsvn_ra_serf\update.c:1590: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\update_editor.c:1888: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\workqueue.c:1584: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\workqueue.c:1502: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\workqueue.c:276: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\workqueue.c:197: (apr_err=720032)
      ..\..\..\subversion\libsvn_subr\io.c:3591: (apr_err=720032)
      svn: E720032: Can't remove directory
      'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\working_copies\wc-1.7.9-dev\calc\branches\my-calc-branch':
      T
      he process cannot access the file because it is being used by another process.
      
      ### And we can't run cleanup unless we cd ..
      
      1.7.9-dev>svn st
      ..\..\..\subversion\svn\status-cmd.c:344: (apr_err=155037)
      ..\..\..\subversion\svn\util.c:981: (apr_err=155037)
      ..\..\..\subversion\libsvn_client\status.c:287: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\node.c:307: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db.c:6765: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:619: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:292: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:158: (apr_err=155037)
      svn: E155037: Previous operation has not finished; run 'cleanup' if it was
      interrupted
      
      1.7.9-dev>svn cleanup
      ..\..\..\subversion\svn\cleanup-cmd.c:99: (apr_err=155004)
      ..\..\..\subversion\libsvn_client\cleanup.c:63: (apr_err=155004)
      ..\..\..\subversion\libsvn_wc\cleanup.c:214: (apr_err=155004)
      ..\..\..\subversion\libsvn_wc\cleanup.c:152: (apr_err=155004)
      ..\..\..\subversion\libsvn_subr\sqlite.c:1135: (apr_err=155004)
      ..\..\..\subversion\libsvn_subr\sqlite.c:1135: (apr_err=155004)
      ..\..\..\subversion\libsvn_subr\sqlite.c:1135: (apr_err=155004)
      ..\..\..\subversion\libsvn_wc\wc_db.c:10880: (apr_err=155004)
      ..\..\..\subversion\libsvn_wc\wc_db.c:10880: (apr_err=155004)
      svn: E155004: Working copy
      'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\working_copies\wc-1.7.9-dev\calc\branches\my-calc-branch'
      locked.
      ..\..\..\subversion\libsvn_wc\wc_db.c:10872: (apr_err=155004)
      svn: E155004:
      'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\working_copies\wc-1.7.9-dev\calc\branches'
      is already locked.
      ..\..\..\subversion\libsvn_wc\wc_db.c:1549: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:619: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:292: (apr_err=155037)
      ..\..\..\subversion\libsvn_wc\wc_db_wcroot.c:158: (apr_err=155037)
      svn: E155037: Previous operation has not finished; run 'cleanup' if it was
      interrupted
      svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
      
      1.7.9-dev>cd ..
      
      1.7.9-dev>svn cleanup
      
      1.7.9-dev>svn up
      Updating '.':
      At revision 474.
      
      ### There's a slightly different error on trunk@1450231:
      
      $ svn st -v
                     473      473 user         .
                     473      470 user         FAQ
                     473      470 user         Makefile
                     473      470 user         README
                     473      470 user         doc
                     473      470 user         doc\INSTALL
                     473      473 user         src
                     473      470 user         src\button.c
                     473      470 user         src\main.c
                     473      374 user         src\real.c
                     473      473 user         src\whole.c
      
      $ svn up
      Updating '.':
      ..\..\..\subversion\svn\update-cmd.c:175: (apr_err=155009)
      ..\..\..\subversion\libsvn_client\update.c:641: (apr_err=155009)
      ..\..\..\subversion\libsvn_client\update.c:581: (apr_err=155009)
      ..\..\..\subversion\libsvn_client\update.c:441: (apr_err=155009)
      ..\..\..\subversion\libsvn_wc\adm_crawler.c:857: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\update.c:2893: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\util.c:2094: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\util.c:2075: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1695: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\util.c:1409: (apr_err=155009)
      ..\..\..\subversion\libsvn_ra_serf\update.c:1905: (apr_err=155009)
      ..\..\..\subversion\libsvn_wc\update_editor.c:1926: (apr_err=155009)
      ..\..\..\subversion\libsvn_wc\workqueue.c:1571: (apr_err=155009)
      svn: E155009: Failed to run the WC DB work queue associated with
      'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\working_copies\wc\calc\branches'
      , work item 552 (dir-remove calc/branches/my-calc-branch)
      ..\..\..\subversion\libsvn_wc\workqueue.c:1465: (apr_err=720032)
      ..\..\..\subversion\libsvn_wc\workqueue.c:804: (apr_err=720032)
      ..\..\..\subversion\libsvn_subr\io.c:3837: (apr_err=720032)
      svn: E720032: Can't remove directory
      'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\working_copies\wc\calc\branches\my-calc-branch':
      The process
       cannot access the file because it is being used by another process.
      
      $ cd ..
      
      $ svn cleanup
      
      $ svn up
      Updating '.':
      At revision 474.
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: