如何更正我省略了主干的 Subversion 项目? [英] How do I correct a Subversion project where I omitted trunk?
问题描述
我有一个 Subversion 项目,叫做 inboundem.这是我的第一个,当我创建它时,我省略了主干.我需要将它放入正确的结构中作为入站/中继.我有另一个这样的项目,但由于没有修改,我做了 svn delete
然后 svn import
并且效果很好.但是我对inboundem有很多修改,我不想丢失历史.
I have a project in subversion, called inboundem. It was my first, and when I created it, I omitted trunk. I need to get it into the correct structure as inboundem/trunk. I had another project like this, but as there were no revisions, I did svn delete
and then svn import
and that worked well. But I have a lot of revisions with inboundem and I do not want to lose the history.
我不能做 svn move
,因为 svn 不会让我将项目移动到自身中.
I cannot do svn move
, as svn will not let me move a project into itself.
我怀疑我需要沿着 svnadmin 转储/加载路径走下去,所以我已经完成了:
I suspect that I need to go down the svnadmin dump/load path, so I have done:
svnadmin dump /subversion/active | svndumpfilter include inboundem > inboundem.dump
这已经创建了一个转储文件,其中包含我所有的入站历史记录.但是我现在该怎么办?
and that has created a dump file with all my history for inboundem. But what do I do now?
我怀疑我应该做 svn delete
并删除项目,然后手动编辑转储文件并将节点路径从 inboundem 更改为 inboundem/trunk,然后执行
I suspect that I should do svn delete
and erase the project, then manually edit the dump file and change Node-path everywhere from inboundem to inboundem/trunk, and then do
svnadmin load /subversion/active < inboundem.dump
这样安全吗?有更容易的方法吗?也许我应该蛮力它,将所有修订版一一查看,删除项目,然后逐个修订版重新创建项目.
Is this safe? Is there an easier way? Maybe I should just brute force it, and check out all the revisions one by one, delete the project and then recreate the project revision by revision.
推荐答案
svn mv svn://repo/inboundem svn://repo/trunk
svn mkdir svn://repo/inboundem
svn mv svn://repo/trunk svn://repo/inboundem/trunk
这篇关于如何更正我省略了主干的 Subversion 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!