What should I do when 'svn cleanup' fails?

后端 未结 30 1493
谎友^
谎友^ 2020-12-04 04:50

I have a lot of changes in a working folder, and something screwed up trying to do an update.

Now when I issue an \'svn cleanup\' I get:

>svn clea         


        
相关标签:
30条回答
  • 2020-12-04 05:12

    I've tried to do svn cleanup via the console and got an error like:

    svn: E720002: Can't open file '..\.svn\pristine\40\40d53d69871f4ff622a3fbb939b6a79932dc7cd4.svn-base':
    The system cannot find the file specified.
    

    So I created this file manually (empty) and did svn cleanup again. This time it was done OK.

    0 讨论(0)
  • 2020-12-04 05:12

    There are some very good suggestions in the previous answer, but if you are having an issue with TortoiseSVN on Windows (a good product, but ...) always fallback to the command line and do a simple "svn cleanup" first.

    In many circumstances the Windows client will not run the cleanup command, but cleanup works fine using thing the SVN command line utility.

    0 讨论(0)
  • 2020-12-04 05:13

    After going through most of the solutions that are cited here, I still was getting the error.

    The issue was case insensitive OS X. Checking out a directory that has two files with the same name, but different capitalization causes an issue. For example, ApproximationTest.java and Approximationtest.java should not be in the same directory. As soon as we get rid of one of the file, the issue goes away.

    0 讨论(0)
  • 2020-12-04 05:14

    Whenever I have similar problems I use rsync (NB: I use Linux or Mac OS X) to help out like so:

    # Go to the parent directory
    cd dir_above_borked
    
    # Rename corrupted directory
    mv borked_dir borked_dir.bak
    
    # Checkout a fresh copy
    svn checkout svn://... borked_dir
    
    # Copy the modified files to the fresh checkout
    # - test rsync
    #   (possibly use -c to verify all content and show only actually changed files)
    rsync -nav --exclude=.svn borked_dir.bak/ borked_dir/
    
    # - If all ok, run rsync for real
    #   (possibly using -c again, possibly not using -v)
    rsync -av --exclude=.svn borked_dir.bak/ borked_dir/
    

    That way you have a fresh checkout, but with the same working files. For me this always works like a charm.

    0 讨论(0)
  • 2020-12-04 05:15

    When I face this issue with TortoiseSVN (Windows), I go to Cygwin and run the 'svn cleanup' from there; it cleans up correctly for me, after which everything works from TortoiseSVN.

    0 讨论(0)
  • 2020-12-04 05:16

    I had the same problem. For me the cause was a conflict with EasySVN and (TortoiseSVN or just SVN). I had auto update and commit with EasySVN (which wasn't working).

    When I turned this off, I was unable to cleanup, commit, or update. None of the above solutions worked, but rebooting did :)

    0 讨论(0)
提交回复
热议问题