How can I restore svn control if the .svn folder has been damaged?

前端 未结 7 869
春和景丽
春和景丽 2021-02-01 04:03

I\'ve got a couple large checkouts where the .svn folder has become damaged so I\'m getting and error, \"Cleanup failed to process the following path..\" And I can no longer com

7条回答
  •  情话喂你
    2021-02-01 04:42

    In case you have changes to the files, and cannot delete them, you can use the Subversion 1.5 feature that allows you to 'checkout with obstructions'.

    Just delete the .svn directory in this directory and:
    (you don't need to delete inside directories when using --depth files, thanks Eric)

    In case the broken directory was the top directory of the working copy:

    svn checkout --depth files --force REPOS WC
    

    And if the directory above the broken one is still versioned run:

    svn update --depth files --force WC
    

    in that directory.
    In both samples REPOS is the url in the repository that matches the broken directory, and WC is the path to the directory.

    Files that were originally modified will be in the modified state after this.

提交回复
热议问题