is there a commend to delete project from svn with all its revisions(total cleanup) ?
从svn删除项目及其所有修订(完全清理)是否有赞誉?
cheers
5 个解决方案
#1
6
The answer is in the Subversion FAQ:
答案在Subversion FAQ中:
There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.
在某些特殊情况下,您可能希望销毁文件或提交的所有证据。 (也许有人意外地提交了一份机密文件。)这并不容易,因为Subversion是故意设计的,永远不会丢失信息。修订是不可变的树,彼此建立在一起。从历史记录中删除修订版会导致多米诺骨牌效应,在所有后续修订版中产生混乱,并可能使所有工作副本无效。
The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)
然而,该项目计划有一天实施一个svnadmin obliterate命令,该命令将完成永久删除信息的任务。 (见问题516.)
In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.
与此同时,您唯一的办法是svnadmin转储您的存储库,然后通过svndumpfilter(不包括坏路径)将dumpfile传输到svnadmin load命令中。有关详细信息,请参阅Subversion书的第5章。
#2
1
No, I don't believe there is.
不,我不相信有。
If you really need to remove files completely from SVN history, I think the only way to do it would be to do something like dumping the repository, filtering out the files you don't want with svndumpfilter, and then recreate the repository from the dump.
如果你真的需要从SVN历史中完全删除文件,我认为唯一的方法就是做一些事情,比如转储存储库,用svndumpfilter过滤掉你不想要的文件,然后从转储中重新创建存储库。
Why do you want to do this?
你为什么要这样做?
#3
0
rm -rf
on the repository usually works fine.
rm -rf在存储库上通常可以正常工作。
#4
0
this is how to do this on Linux:
这是在Linux上如何做到这一点:
/>svnadmin dump /path/to/repos > proj.dump
/>cat proj.dump | svndumpfilter exclude somefolder > cleanproj.dump
/>service svn stop
/>BACKUP /path/to/repos/conf /path/to/repos/hooks (all custom configuration for this repository)
/>DELETE /path/to/repos
/>svnadmin create /path/to/repos
/>RESTORE /path/to/repos/conf /path/to/repos/hooks
/>svnadmin load /path/to/repos < cleanproj.dump
/>service svn start
done
#5
0
I'm assuming that you are talking about multiple projects under the same repository:
我假设你在谈论同一个存储库下的多个项目:
myrepo/
project1/
project2/
If you simply want a project to 'disappear' without screwing with the repository history, you can simply hide this path if you are using an authentication mechanism that utilizes authz. In other words, you are not using 'svn+ssh' to access the repository.
如果您只是希望项目“消失”而不会破坏存储库历史记录,那么如果您使用的是使用authz的身份验证机制,则可以简单地隐藏此路径。换句话说,您没有使用'svn + ssh'来访问存储库。
Let's say I already have a group in my authz called 'everyone'. The in my authz I will set something like:
假设我已经在我的authz中有一个名为'everyone'的小组。在我的authz我将设置如下:
[/project1]:
@everyone =
#1
6
The answer is in the Subversion FAQ:
答案在Subversion FAQ中:
There are special cases where you might want to destroy all evidence of a file or commit. (Perhaps somebody accidentally committed a confidential document.) This isn't so easy, because Subversion is deliberately designed to never lose information. Revisions are immutable trees which build upon one another. Removing a revision from history would cause a domino effect, creating chaos in all subsequent revisions and possibly invalidating all working copies.
在某些特殊情况下,您可能希望销毁文件或提交的所有证据。 (也许有人意外地提交了一份机密文件。)这并不容易,因为Subversion是故意设计的,永远不会丢失信息。修订是不可变的树,彼此建立在一起。从历史记录中删除修订版会导致多米诺骨牌效应,在所有后续修订版中产生混乱,并可能使所有工作副本无效。
The project has plans, however, to someday implement an svnadmin obliterate command which would accomplish the task of permanently deleting information. (See issue 516.)
然而,该项目计划有一天实施一个svnadmin obliterate命令,该命令将完成永久删除信息的任务。 (见问题516.)
In the meantime, your only recourse is to svnadmin dump your repository, then pipe the dumpfile through svndumpfilter (excluding the bad path) into an svnadmin load command. See chapter 5 of the Subversion book for details about this.
与此同时,您唯一的办法是svnadmin转储您的存储库,然后通过svndumpfilter(不包括坏路径)将dumpfile传输到svnadmin load命令中。有关详细信息,请参阅Subversion书的第5章。
#2
1
No, I don't believe there is.
不,我不相信有。
If you really need to remove files completely from SVN history, I think the only way to do it would be to do something like dumping the repository, filtering out the files you don't want with svndumpfilter, and then recreate the repository from the dump.
如果你真的需要从SVN历史中完全删除文件,我认为唯一的方法就是做一些事情,比如转储存储库,用svndumpfilter过滤掉你不想要的文件,然后从转储中重新创建存储库。
Why do you want to do this?
你为什么要这样做?
#3
0
rm -rf
on the repository usually works fine.
rm -rf在存储库上通常可以正常工作。
#4
0
this is how to do this on Linux:
这是在Linux上如何做到这一点:
/>svnadmin dump /path/to/repos > proj.dump
/>cat proj.dump | svndumpfilter exclude somefolder > cleanproj.dump
/>service svn stop
/>BACKUP /path/to/repos/conf /path/to/repos/hooks (all custom configuration for this repository)
/>DELETE /path/to/repos
/>svnadmin create /path/to/repos
/>RESTORE /path/to/repos/conf /path/to/repos/hooks
/>svnadmin load /path/to/repos < cleanproj.dump
/>service svn start
done
#5
0
I'm assuming that you are talking about multiple projects under the same repository:
我假设你在谈论同一个存储库下的多个项目:
myrepo/
project1/
project2/
If you simply want a project to 'disappear' without screwing with the repository history, you can simply hide this path if you are using an authentication mechanism that utilizes authz. In other words, you are not using 'svn+ssh' to access the repository.
如果您只是希望项目“消失”而不会破坏存储库历史记录,那么如果您使用的是使用authz的身份验证机制,则可以简单地隐藏此路径。换句话说,您没有使用'svn + ssh'来访问存储库。
Let's say I already have a group in my authz called 'everyone'. The in my authz I will set something like:
假设我已经在我的authz中有一个名为'everyone'的小组。在我的authz我将设置如下:
[/project1]:
@everyone =