免费的源代码控制系统不需要存储每个文件的本地副本,从而使空间使用量加倍?
是否有一个源代码控制系统(除了 CVS 之外)可以配置为不存储文件的本地副本?或者也许它只是没有按设计这样做?理想情况下,可以通过扩展名或文件大小来配置此类选项。
例如,如果我有时确实想在 SVN 中存储大型电影或图片,最终结果是客户端上的空间使用量增加一倍 - 而且没有办法解决这个问题。
我意识到一个解决方案就是不提交此类文件,但我的问题是寻找其他解决方案。
作为记录,我刚刚尝试了 Mercurial (Hg),它也使用了两倍的空间。我怀疑 Git 也会做同样的事情。
PS 我不明白为什么 SVN 不能实现对此的支持。这该有多简单啊——如果文件没有存储在本地,就远程获取它,我相信 CVS 就是这样做的。如果网络当前不可用,则显示错误。 /发泄
Is there a source control system (besides CVS) that can be configured to NOT store local copies of files? Or perhaps it just doesn't do it by design? Ideally, one could configure such option by extension or file size.
For example, if I do sometimes want to store large movies or pictures in SVN, the end result is double the space usage on the client - and there's no way around it.
I realize one solution is just not to commit such files but my question is searching for that other solution.
For the record, I just tried Mercurial (Hg) and it used up twice the space as well. I suspect Git would do the same.
P.S. I don't see why SVN couldn't implement support for this already. How simple would it be - if a file is not stored locally, get it remotely, like CVS, I believe, does. If network is not available right now, show error. /vent
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以使用 Bazaar 对分支进行轻量级签出。工作目录将只包含可编辑的源代码,bzr 将为几乎所有操作进行网络查找。但你会发现,即使你使用常规分支,具有所有历史记录的分支的大小通常也小于工作树。
You can use Bazaar with a lightweight checkout of a branch. The working directory will only contain the editable source code and bzr will do a network lookup for almost any operation. But you will find that even if you use regular branches, the size of the branch with all the history is usually smaller than the working tree.
SVN(以及所有其他现代 VCS)旨在存储大量小型文本文件,而不是大量大型二进制文件。所有这些都保留本地副本,因为它很便宜(大多数项目很少使用超过几兆字节),并且它使几乎所有操作(差异、状态、本地提交)变得更快。
所以你使用了错误的工具。如果您需要管理图片,请尝试 Picasa 或类似工具。不幸的是,大多数图像数据库不知道如何保留图像的编辑历史记录(这很遗憾;我已经打开了 针对 digikam 的 bug 几年前,现在仍然处于开放状态)。
我的意思是,保留原始图像并仅保存您所做的所有编辑的选项以及当前的“最终”图像会更有效。之间的所有内容都可以从原始图像重新创建并再次应用操作。就效率而言,世界上没有哪个 VCS 能够超越它(“对比度 +10%”与比较两个 JPG)。
因此,今天最好的选择是使用专业的照片编辑工具(->不是免费的),或者您必须复制并重命名要编辑的照片。
是的,这很糟糕。
SVN (and all other modern VCS) was designed to store lots of small text files, not huge amounts of big binaries. The all keep a local copy because it's cheap (most projects will rarely use more than a few megabytes) and it makes almost all operations much faster (diff, status, local commit).
So you're using the wrong tool. If you need to manage images, try Picasa or something similar. Unfortunately, most image databases don't know how to keep the editing history of an image (which is a pity; I've opened a bug against digikam years ago and it's still open).
I mean, it would be much more efficient to keep the original image and just save the options for all the edits you made plus the current "final" image. Everything in between could be recreated from the original image and applying the operations again. No VCS in the world would be able to beat that in terms of efficiency ("Contrast +10%" vs. comparing two JPGs).
Therefore, your best bet today is either a professional photo editing tool (-> not free) or you must copy and rename photos that you want to edit.
Yeah, it sucks.
我使用过的唯一一个不会产生任何过多额外使用空间的就是普遍讨厌的视觉源安全。
SoureSafe 6.0 仅会产生源绑定的存储开销。
不过,我认为 SourceSafe 是一个源码销毁系统,所以我根本不推荐它。
The only one which i have used which didnt incur any excessive extra usage space was the universally hated, visual sourcesafe.
SoureSafe 6.0 only incurs storage overhead for source bindings.
However, i consider SourceSafe as a source destruction system, so i dont recommend it at all.
ClearCase 仅将本地修改的文件存储在您的工作区域中(称为视图)他们的命名约定)。
ClearCase stores only locally modified files in your working area (called a view in their naming convention).
这可能听起来很愚蠢(也许确实如此),但是一旦您提交了大文件,为什么不直接删除磁盘上的文件呢?毕竟,VCS 可以准确地用于在您需要时恢复文件。
我刚刚在 Bazaar 上尝试过:
注意:这是在 Windows 上,但我使用 UnxUtils 命令,它们在命令行上很方便。
It might sound stupid (and perhaps it is), but once you have committed your big file, why you not just delete the file on disk? After all, the VCS can precisely be used to restore the file when you need it.
I just tried that with Bazaar:
Note: that's on Windows but I use the UnxUtils commands, they are handy on the command line.
您的图片库有多大?如今,我认为购买另一个 80GB 硬盘驱动器(如果您能在市场上找到这么小的硬盘驱动器)会比购买具有节省磁盘空间功能的源代码控制包更便宜。
Just how big is your image library? These days, I think it would be cheaper to buy another 80GB hard drive -- if you can find one that small on the market -- than to buy a source-code control package with disk-space-saving features.