如何从切换到 svn 中不存在的分支中恢复?
我是如何陷入困境的:
svn switch http://repo/project/rbanches/branchname/plugins/com.securemacprogramming.myplugin com.securemacprogramming.myplugin
这导致了什么(除了 svn 状态中的“传入删除开关”之外):
svn switch http://repo/project/branches/branchname/plugins/com.securemacprogramming.myplugin com.securemacprogramming.myplugin
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]
我已经通过完全删除插件文件夹设法进入半可用状态,但是 svn up来自父级的 不会恢复内容。我可以从 svn co 将其签出到正确的位置,但是工作副本似乎来自两个存储库:父级认为该文件夹不受版本控制(即它显示“?”)。 '),myplugins 文件夹显示了正确的 svn info 等。那么我怎样才能恢复到 subversion 中文件夹连接的位置以及我期望的分支上的位置,而不需要删除本地副本并启动再次?
在那次混乱期间,我至少没有在服务器上进行任何更改,不过当然,自从我首先在我试图进行的分支上提交了更改之后。
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.myplugin
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,如果我将 --depth=infinity 选项传递给 svn revert,我就可以撤销它认为将在 svn switch 上传入的更改。
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 onsvn switch
.