如何从切换到 svn 中不存在的分支中恢复?

发布于 2024-09-27 09:50:06 字数 854 浏览 0 评论 0原文

我是如何陷入困境的:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花之痕靓丽 2024-10-04 09:50:06

事实证明,如果我将 --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 on svn switch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文