如何在现有项目之上创建 SVN 版本控制? [英] How can I create SVN versioning on top of an existing project?

查看:24
本文介绍了如何在现有项目之上创建 SVN 版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作中,我们有一个非常大的项目(大约 30,000 个文件),由 Borland StarTeam 源代码控制系统管理.我们想迁移到 SVN,但有一些障碍.最重要的问题是在所有开发人员的虚拟机上设置存储库.

At work we've got a very large project (approx. 30,000 files) managed by a Borland StarTeam source control system. We'd like to migrate to SVN, but there are a few hurdles in the way. The most significant one is the problem of getting the repository set up on all the devs' VMs.

有两种基本方法可以在硬盘上设置新的 SVN 版本文件夹.(在 Windows 上,使用 TortoiseSVN.)您可以从存储库中检出 SVN 项目,或者获取现有代码并将其上传到(可能是空的)存储库,在这些操作中的任何一个之后,您最终都会得到一个带有 SVN 的文件夹树元数据文件夹.但是我们有几十个开发人员,他们每个人都已经拥有该项目的完整副本.我们真正想做的是上传一次,然后运行某种将此现有文件夹与 [任何地方] 的存储库相关联并同步它们"操作.

There are two basic ways to set up a new SVN-versioned folder on your hard drive. (On Windows, using TortoiseSVN.) You can either check out an SVN project from a repository, or take existing code and upload it to a (presumably empty) repository, and after either of these operations you end up with a folder tree with SVN metadata folders. But we have a few dozen devs who each have an entire copy of the project already. What we'd really like to do is upload it once, and then run some sort of "Associate this existing folder with the repository at [wherever] and synchronize them" operation.

SVN 支持吗?如果是这样,如何以及是否可以在 TortoiseSVN 中进行,或者是否需要其他工具?

Does SVN support this? If so, how, and is it possible to do in TortoiseSVN, or does it require other tools?

推荐答案

在硬盘驱动器上的现有文件夹中右键单击SVN checkout...",该文件夹的内容与您所在的存储库相同即将退房.Tortoise 在本地找到的每个文件,它会首先与存储库中的版本进行比较,如果校验和匹配(我假设它正在进行某种校验和比较),则不下载它,而是在结帐协议中将其标记为版本化"并跳到下一个文件.

What should work is doing a right-click "SVN checkout..." on an existing folder on your hard drive whose contents are identical with the repository you are about to check out. Every file Tortoise finds locally, it will compare to the version in the repository first, and if the checksums match (I assume it is doing some sort of checksum comparison), not download it, but mark it as "versioned" in the checkout protocol and skip to the next file.

最终结果应该是一个不错的结帐.据我所知,与存储库中版本不匹配的文件将被覆盖,并且无法恢复.

The end result should be a nice checkout. Files that don't match the version in the repository will be overwritten to my knowledge, and cannot be restored.

在您所处的情况下,这一直对我有用;确保您有数据备份,或者先在较小的子集上尝试.

This has always worked for me in the situation you are in; Make sure you have backups of your data, or try it on a smaller subset first.

这篇关于如何在现有项目之上创建 SVN 版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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