重大项目的初步承诺 [英] Initial commit of major projects to mercurial

查看:93
本文介绍了重大项目的初步承诺的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有超过10年的软件项目要提交给Hg.

I have over 10 years of software projects that I would like to commit to Hg.

这是与Delphi 7相关的代码,包括第三方许可的库,由svn管理的开源库以及我自己的代码(我正计划迁移至Delphi XE5).

This is for code related to Delphi 7, and includes 3rd party licensed libraries, open source libs managed with svn, and my own code (I'm planning a migration to Delphi XE5).

第3方和svn派生的库通常在Delphi IDE中安装了组件,应保持最新"版本(因为回滚通常会使IDE崩溃),因此我将它们备份(它们是从未回滚的svn外部组件.

The 3rd party and svn-derived libs generally have components installed in the Delphi IDE, and should be kept at "latest" version (as a roll-back will generally bork the IDE), so I just back them up (they were svn externals that never got rolled-back).

我的布局如下:

-Licensed
  |-(third party libs)
  ...
-SVNRoot
  |-(various open source from svn)
  ...
-CodeRoot
   |
   |-common       (common to all projects)
   |
   |--major1
   |    |
   |    |-common      (common to the major1 software)
   |    |     
   |    |-Cust1       (projects for customer1)
   |    |  |
   |    |  |-C1Proj1
   |    |  | 
   |    |  |-C1ProjN 
   |    |     
   |    |-Cust2
   |       |
   |       |-C2Proj1
   |       | 
   |       |-C2ProjN 
   |
   |--major2
   |    |
   ...  ... 

也就是一个通用"文件夹,其中包含我通常在所有项目中都包含的代码,无论它们部署在何处.

That is, a "common" folder with code that I generally include in all my projects, regardless of where they are deployed.

然后按主要产品细分,并根据客户定制子项目.

Then a breakdown by major product, with sub-projects customized by customer.

我已经阅读了各种教程,但是我似乎缺少了一些东西...

I've read a variety of tutorials, but I seem to be missing something...

我了解如何通过移至.. \ CodeRoot并运行Hg Init将CodeRoot下的所有内容添加到本地存储库.

I see how I can add everything under CodeRoot to a local repository by moving to ..\CodeRoot and running Hg Init.

我不清楚我是否很高兴将所有内容都放在一个存储库中.

It isn't clear to me that I'd be happy having everything under a single repository.

OTOH,如果不是最顶层的公用"文件夹,那么我有问题.

OTOH, if that topmost "common" folder isn't in everything, I have a problem.

每个主要项目下的常见"都有相同的问题.

The "common" under each major project has the same issue.

我不确定我的粒度"应该是什么-每个MajorProject或每个CustProject的存储库.

I'm not sure yet what my "granularity" should be - a repository per MajorProject, or per CustProject.

所以-问题:

1)如果我使用每个MajorProject"-如何处理最顶层的公用"文件夹?

1) If I go with "per MajorProject" - how to handle that topmost "common" folder?

2)如果我使用"per CustProject"-如何处理最上面和每个主要项目的公用文件夹(如果它们与最上面的文件夹的处理方式不同)

2) If I go with "per CustProject" - how do I handle the topmost AND per-major project common folders (if they are handled differently than topmost)

3)最后,如果我想创建一个远程中央存储库(而不是本地),如何在将其克隆到计算机本地之前安全地将所有文件移动到远程中央存储库?

3) finally if I want to create a remote central repository (instead of local), how do I safely move all my files to a remote central repository before cloning it local to my machine?

TIA.

干杯, 教育局

推荐答案

尽管您可能在顶层使用子目录,但我绝对不会将所有内容都粘贴在一个存储库中.但是我自己还没有用过.

I would definitely not stick everything in one repository, although you might use sub-repostories within a top level. I havent used those myself however.

我建议将其分成有意义的最小块.如果您以后决定确实想要更大的分组,则始终可以从多个存储库中提取新的存储库.

I would suggest split it up in the smallest chunks that make sense. You can always pull from multiple repos into a new repo if you later decide you actually want a larger grouping.

关于将文件放入服务器托管的中央存储库中.只需将其推送到本地存储库中的服务器克隆上即可.

With regards to getting the files into a central, server held repo. Just push to it, or on the server clone from your local repo.

这篇关于重大项目的初步承诺的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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