How to fix “containing working copy admin area is

2019-03-07 11:31发布

I deleted manually a directory I just added, offline, in my repository. I can't restore the directory.

Any attempt to do an update or a commit will fail with:

"blabla/.svn" containing working copy admin area is missing.

I understand why, but is there anyway to fix this.

I don't want to checkout the entire repo and add my changes to it manually, it would take hours.

20条回答
三岁会撩人
2楼-- · 2019-03-07 11:48

According to this: http://www.devcha.com/2008/03/svn-directory-svn-containing-working.html

Check-out the folder "blabla" to a different location and then copy its .svn folder back into the original "blabla".

查看更多
放我归山
3楼-- · 2019-03-07 11:48

I tried svn rm --force /path/to/dir to no avail but ended up just running svn up and it fixed it for me.

查看更多
叛逆
4楼-- · 2019-03-07 11:48

I came across this problem when replacing a third party API library with a newer version, and none of the solutions here really worked for me because I wanted to replace the SVN version with the local version. My solution was as follows:

1) Move the offending folder to my home dir, delete it from SVN and commit:

mv foldercausingproblem ~/
svn --force delete foldercausingproblem
svn commit --message "Temporary removing folder with old API"

2) Put the folder back, add it to SVN and commit again:

mv ~/foldercausingproblem ./
svn --force add .
svn commit --message "Finally all working!"

Slightly irritating to have to commit twice, but it seems to have worked fine.

查看更多
萌系小妹纸
5楼-- · 2019-03-07 11:53

The simplest that helped me:

rm -rf _dir_in_question_
svn up

If you have changes in the problematic dir, then this is not a good solution for you.

查看更多
Evening l夕情丶
6楼-- · 2019-03-07 11:54

We use maven and svn. It was an mistaken checkin of target directory to SVN that cause this error. Removing that fixed everything, if this hint helps anyone.

查看更多
爷、活的狠高调
7楼-- · 2019-03-07 11:54

I had this error recently. It was caused by root owning a couple of files in the directory giving this error.

After I changed the permissions everything worked as expected.

查看更多
登录 后发表回答