What should I do when 'svn cleanup' fails?

后端 未结 30 1499
谎友^
谎友^ 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:22

    If the issue is case sensitivity (which can be a problem when checking out to a Mac, as well as Windows) and you don't have the option of checking out onto a *nix system, the following should work. Here's the process from the beginning:

    % svn co http://[domain]/svn/mortgages mortgages
    

    (Checkout ensues… then…)

    svn: In directory 'mortgages/trunk/images/rates'
    svn: Can't open file 'mortgages/trunk/images/rates/.svn/tmp/text-base/Header_3_nobookmark.gif.svn-base': No such file or directory
    

    Here SVN is trying to check out two files with similar names that differ only by case - Header_3_noBookmark.gif and Header_3_nobookmark.gif. Mac filesystems default to case insensitivity in a way that causes SVN to choke in situations like this. So...

    % cd mortgages/trunk/images/rates/
    % svn up
    svn: Working copy '.' locked
    svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
    

    However, running svn cleanup doesn't work, as we know.

    % svn cleanup
    svn: In directory '.'
    svn: Error processing command 'modify-wcprop' in '.'
    svn: 'spacer.gif' is not under version control
    

    spacer.gif isn't the problem here… It just can't move past the previous error to the next file. So I deleted all of the files from the directory other than .svn, and removed the SVN log. This made cleanup work, so that I could check out and rename the offending file.

    % rm *; rm -rf .svn/log; svn cleanup
    % svn up Header_3_nobookmark.gif
    A    Header_3_nobookmark.gif
    Updated to revision 1087.
    % svn mv Header_3_nobookmark.gif foo
    A         foo
    D         Header_3_nobookmark.gif
    % svn up
    A    spacer.gif
    A    Header_3_noBookmark.gif
    

    Following this, I was able to go back to the root directory of the project, and run svn up to check out the rest of it.

提交回复
热议问题