使用 Subversion,“实际"在哪里?源代码存储? [英] Using Subversion, where is "actual" source code stored?

查看:35
本文介绍了使用 Subversion,“实际"在哪里?源代码存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚习惯了 Subversion,我有一个关于版本控制的基本问题.

I'm just getting used to Subversion and I have a fundamental question about versioning.

我已经在我的网络中托管的服务器S"上创建了我的 SVN 存储库.假设我从网络中的另一台计算机A"导入"代码、文件、目录等,它会被添加到我服务器的 SVN 存储库中.

I've created my SVN repository on a server "S" hosted in my network. Assuming I "import" code, files, directories, etc. from another computer "A" in the network, it gets added to my server's SVN repository.

我从网络中的另一台计算机B"进行结帐,我可以从存储库中获取所有代码等等.

I do a checkout from another computer "B" in the network and I can get all the code from the repository and so on.

假设我格式化或销毁 PCA",我的源代码是否仍可通过 B 中的结帐获得?

Assuming I format or destroy PC "A", would my source code still be available through a checkout in B?

如果是,当我实际浏览服务器上的存储库文件夹时,我没有找到该文件夹​​的副本,只有配置、db 等目录.服务器 S 上的数据物理存储在哪里(如果存在的话)?目前,存储库的目录大小显然比源代码文件夹小得多.

If yes, when I actually browse into my repository folder on the server, I don't find a replica of the folder, only the configuration, db, etc. directories. Where is the data physically stored on the server S, if it is there at all? Currently, the directory size of the repository is clearly much smaller than the source code folders.

我认为 VSS 以某种无法识别的 db 格式保留了一份实际代码的副本,git 可以选择不需要这样做.SVN 是否也在某处维护了一份代码副本?

I think VSS keeps a copy of the actual code in some unrecognizable db format, git has the option of not requiring to do this. Does SVN also maintain a copy of the code somewhere?

推荐答案

当您提交对存储库的更改时,它们将存储在您的 subversion 存储库内的服务器 S 上.存储库实际上由存储在 db/revs 文件夹中的一系列增量构成 - 从存储库的一个版本更改为下一个版本.因此,服务器上的存储库将与源代码的结构不同.SVN 存储库作为一个整体进行版本控制 - 存储库中的任何更改都会增加存储库的版本.

When you commit changes to your repository, they will be stored on server S inside your subversion repository. The repository is actually constructed of a series of deltas stored inside the db/revs folder - changes from one version of the repository to the next. As such, the repository on the server will not resemble the structure of your source code. SVN repositories are versioned as a whole - any change within the repository increases the version of the repository.

您可以通过将存储库的干净副本从 Subversion 服务器签出到任何机器上来重新创建源代码.

You can recreate your source code by checking out a clean copy of the repository from the subversion server onto any machine.

这篇关于使用 Subversion,“实际"在哪里?源代码存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆