如何还原颠覆导入? [英] How to revert a subversion import?
问题描述
我在导入到某个 SubVersion 存储库时出错,我想恢复此导入.
I did a mistake importing in an import to some SubVersion repository, and I want to revert this import.
我该怎么做?
我的错误是:给定一个包含子文件夹的文件夹
My mistake was this: Given a folder with subfolders
a \
a \ a1
a \ b1
a \ c1
我想在仓库文件夹F中导入文件夹a,所以仓库中的结构是
I wanted to import the folder a inside a repository folder F, so the structure in the repository be
F\a
但我导入了文件夹 a1、b1 和 c1,现在存储库是
but I imported the folders a1, b1 and c1 and the repository now is
F \ a1
F \ b1
F \ c1
我正在使用 Tortoise Svn,所以如果您的说明是这样的,那就更好了.
I'm using Tortoise Svn, so if your instructions are in terms of that, are better.
推荐答案
svn mkdir repo-base/a
svn mv repo-base/a1 repo-base/a/
svn mv repo-base/b1 repo-base/a/
svn mv repo-base/c1 repo-base/a/
其中 repo-base 是例如https://svn.my.net/svn/project/trunk/
where repo-base is e.g. https://svn.my.net/svn/project/trunk/
然后,完成后,在本地查看.
then, when you're done, check it out locally.
根据我的经验,通过针对远程路径发出命令最可靠地实现重命名文件和移动整个目录.
renaming files and moving whole directories is most reliably achieved by issuing the commands against remote paths in my experience.
这篇关于如何还原颠覆导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!