What should I do when 'svn cleanup' fails?

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

提交回复
热议问题