开发者

Need help fixing SVN: "not a working copy directory"

开发者 https://www.devze.com 2023-01-27 04:18 出处:网络
I had a folder, plugins/south which was checked into my repository. Then I needed to upgrade it, so I deleted the folder and put a new one in its place. Now I can\'t commit my changes.

I had a folder, plugins/south which was checked into my repository. Then I needed to upgrade it, so I deleted the folder and put a new one in its place. Now I can't commit my changes.

In hindsight, I probably should have SVN deleted it, but it's too late for that now.

mark@ubuntu:~/myproject$ svn add plugins/south
svn: Working copy 'plugins' l开发者_如何学运维ocked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
mark@ubuntu:~/myproject$ svn cleanup
svn: 'plugins/south' is not a working copy directory

How do I fix this?

Thought maybe I could delete the version in the repo and then check a new one in...

mark@ubuntu:~/myproject$ svn delete --keep-local plugins/south
svn: Working copy 'plugins' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

But it won't let me do that either.


This working copy now isn't..

Your best bet imo (this may not be /right/ but it should work) is to check out the working copy elsewhere, then apply your changes from this set, then commit.


You can also try

svn revert plugins/south

to get back the old version, then make changes as necessary.

Alternatively,

cd /tmp
svn co <stuff>/plugins
cd -
mv plugins plugins-old
mv /tmp/plugins .

or the moral equivalent.


Your problem is you deleted the entire directory along with the ".svn" directory that subversion uses. The way you should do it is "svn delete" the directory, commit to remove it from your local directory, create the new directory, and then "svn add" the new directory.

To clean up what you have, move your new directory to another location, do an "svn update" to bring the original back, svn delete it, commit, move your new directory back into place, and svn add it.


You can try to do an update of the deleted directory and then delete it with svn rmafterwards.

But before doing this you should move the new directory to not get into the way.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号