Subversion 会保存已删除的文件吗?

发布于 2024-11-04 05:02:26 字数 640 浏览 1 评论 0原文

我正在使用一个颠覆存储库,它是由一个慷慨的网站免费提供给我的。这意味着我只有 200MB 的空间可用于存储库。不过,我并没有抱怨,因为我确实认为这相当慷慨,并且足以满足我的源代码需求。

然而,当我想“回到过去”解决问题时,我偶尔会使用 subversion 来处理存储量更大的文件类型,仅仅是因为系统非常强大。我是一个相当杂乱无章的人,拥有专用版本控制系统之类的东西来帮助我整理事情真的非常有帮助。

那么,我想知道的是,我在云上的存储库是否会“保存”一个我可能错误地添加到版本控制中的大文件。假设我将几个大文件(比方说大量 2MB jpeg)添加到 subversion 存储库中。此外,我还可以在后续提交时稍微编辑它们,并为日志提供一些不必要的详细提交消息注释。然后我意识到我不再需要任何这些 jpeg,并将它们删除。

由于我应该能够在任何先前的提交编号处签出存储库,当然包括我最初添加文件的提交编号,这是否意味着即使我稍后从存储库中删除它们,实际的存储库将继续保留对他们来说永远是否是为了保证能够结帐?

如果是这样的话,我想有删除这些数据的规定吗?如果我的存储库因此类“一次性”数据而变得臃肿(例如,我用完了 200MB 配额,但仍想将我的存储库用于编程目的),则必须存在一些我有什么办法可以减掉脂肪吗?

很抱歉没有提前研究这个主题。现在已经晚了。

I'm using a subversion repository which was given to me for free by a generous website. This means that I only have 200MB to work with for the repository. I'm not complaining, though, because I do consider this quite generous, and more than adequate for my source code needs.

However I have been occasionally using subversion for more storage-heavy file types, simply because of how powerful the system is, when I want to go "back in time" to work things out. I am a rather disorganized person, and having something like a dedicated version control system to help me sort things is really really helpful.

What I'm wondering, then, is whether my repository on the cloud will be "holding on" to a large file that I might have added to version control by mistake. Suppose I add several large files (let's say a multitude of 2MB jpeg's) to a subversion repository. I could in addition slightly edit them a bit on a subsequent commit, and also provide some unnecessarily verbose commit message comments for the log. Then I realize I don't want any of these jpegs anymore, and delete them.

Since I should be able to checkout the repository at any previous commit number, including of course the one at which I originally added the files, does that mean that even if I delete them from the repo later, the actual repo will continue to hold on to them forever if it is to ensure the ability to checkout?

If this is the case, I imagine there is a provision for deleting this data? If my repo becomes bloated with this type of "disposable" data (for instance I run out of my 200MB quota and still want to use my repo a little bit more for my programming purposes) there must exist some way for me to trim out the fat?

Apologies for not researching the topic much in advance. It's late.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

两人的回忆 2024-11-11 05:02:26

存储库肯定会保留数据。正确的技术术语已被删除。这里有一个链接说明为什么要使用此功能Subversion 上不存在。

它也不会出现在下一个版本 1.7 / 1.8 中。 Subversion 路线图位于此处

由于您使用的是托管 Subversion,请检查主机是否允许在服务器上远程执行 svndumpfilter 命令。

The repo will definitely hold on to the data. The correct technical term is obliterate. Here is a link to why this feature doesn't exist on Subversion.

It won't come in the next versions 1.7 / 1.8 either. The Roadmap for Subversion is here.

Since you are using hosted Subversion, check with the host if they allow svndumpfilter command to be remotely executed on the server.

空城之時有危險 2024-11-11 05:02:26

是的,“删除”的文件仍会在 SVN 存储库中。

Yes it 'deleted' files would still be in the SVN repo.

美人迟暮 2024-11-11 05:02:26

这是否意味着即使我稍后从存储库中删除它们,如果要确保结账的能力,实际的存储库也会继续永远保留它们?

是的

如果是这种情况,我想有删除这些数据的规定吗?

不,没有。但是,您可以将存储库转储到文件中,删除不需要的内容,重新进行修订并将其加载回新的存储库中。但要小心...有一些 过滤工具可帮助执行此任务。该命令称为 svndumpfilter。

does that mean that even if I delete them from the repo later, the actual repo will continue to hold on to them forever if it is to ensure the ability to checkout?

Yes

If this is the case, I imagine there is a provision for deleting this data?

No there is not. However you can dump the repository to a file, cut off the things you don't want, renumerotate the revisions and load it back into a fresh repository. But take care... There is some filtering tooling available to help in performing this task. The command is called svndumpfilter.

梦一生花开无言 2024-11-11 05:02:26

源代码控制系统付出了很大的努力来确保您可以返回到任何时间点,并且所有数据都可以像以前一样在特定的修订号上供您使用。

版本控制的全部目的是确保没有任何内容被永久删除或覆盖。因此,“删除”文件只会将其从当前视图中删除,而不会从之前的视图中删除;对于之前的视图,它仍然会在那里。

有一些方法可以转储或手动删除不需要的项目,但它们往往对用户来说很不友好。

The source control system puts a lot of effort into making sure you can go back to any point in time and that all data is available to you, as it used to be, at that particular revision number.

The whole point of version control is to make sure nothing ever gets deleted or overwritten permanently. So, 'deleting' a file, only removes it from your current view, not for the previous view; for the previous view, it will still be there.

There are methods of dumping en manually removing unwanted items, but they tend to be far from user friendly.

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