开发者

How can I recover from switching to a non-existent branch in svn?

How I got into a pickle:

svn switch http://repo/project/rbanches/branchname/plugins/com.securemacprogramming.myplugin com.securemacprogramming.myplugin

What this caused (in addition to "incoming delete on switch" in svn status):

svn switch http://repo/project/branches/branchname/plugins/com.securemacprogramming.myplugin com.securemacprogramming.m开发者_StackOverflow中文版yplugin
svn: . is not under version control

svn switch http://repo/project/trunk/plugins/com.securemacprogramming.myplugin com.securemacprogramming.myplugin
svn: . is not under version control

svn revert
[nothing changes]

I've managed to get into a semi-usable state by completely deleting the plugin folder, but svn up from the parent won't recover the content. I can check it out into the correct location from svn co, but then the working copy seems to come from two repositories: the parent level thinks the folder isn't under version control (i.e. it shows '?'), the myplugins folder shows the correct svn info etc. So how can I recover to where the folders are connected in subversion's mind and are on the branches I expect, short of deleting the local copy and starting again?

I did at least make no changes on the server during that messing about, though have of course since committed the changes on the branch I was trying to make in the first place.


It turns out that had I passed the --depth=infinity option to svn revert, I could have backed out the changes it thought would be incoming on svn switch.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜