关于Web设计的版本控制的最佳实践

时间:2021-06-24 20:09:08

We are in the process of using SVN on a project that has a core and modules. We want module development to be separate from the core, but the modules will be inside of the core files.

我们正在对具有核心和模块的项目使用SVN。我们希望模块开发与核心分离,但模块将位于核心文件中。

My question is this: How would you set up the repositories to manage something like this? Would you make all of your modules into their own repositories, so that if you want to work on a particular module, you need to check out a version of the core and the module you want to work on, or would you approach it in a different way.

我的问题是:你如何设置存储库来管理这样的东西?您是否将所有模块都放入他们自己的存储库中,这样如果您想要处理特定模块,您需要查看一个版本的核心和您想要处理的模块,或者您是否需要在不同的方式。

Think something like WordPress.

想想像WordPress这样的东西。

Example: root/
  index.php
  file1.php
  file2.html
  something.php
  FolderA
  FolderB
  ModulesFolder/
    Module1Folder/
    Module2Folder/

示例:root / index.php file1.php file2.html something.php FolderA FolderB ModulesFolder / Module1Folder / Module2Folder /

2 个解决方案

#1


We have had a repository for the core and then repositories for our sub-modules, and then use the subversion "externals" prop to have the core reference the modules, and it will automatically checkout/update the references projects according to your settings. So it is for example possible to keep the module at a given revision.

我们有一个核心存储库,然后是我们的子模块的存储库,然后使用subversion“externals”prop让核心引用模块,它将根据你的设置自动检出/更新引用项目。因此,例如可以将模块保持在给定的版本。

#2


We have a very similar system, and we use a single repository and break up the trunk and each branch for the core and the modules. We find it's easier to maintain versions, tags, branches, etc with such a structure. It also enables us to track everything with a single Trac installation. ( http://trac.edgewall.org/ )

我们有一个非常相似的系统,我们使用单个存储库并拆分主干和核心和模块的每个分支。我们发现使用这样的结构维护版本,标签,分支等更容易。它还使我们能够通过单个Trac安装来跟踪所有内容。 (http://trac.edgewall.org/)

#1


We have had a repository for the core and then repositories for our sub-modules, and then use the subversion "externals" prop to have the core reference the modules, and it will automatically checkout/update the references projects according to your settings. So it is for example possible to keep the module at a given revision.

我们有一个核心存储库,然后是我们的子模块的存储库,然后使用subversion“externals”prop让核心引用模块,它将根据你的设置自动检出/更新引用项目。因此,例如可以将模块保持在给定的版本。

#2


We have a very similar system, and we use a single repository and break up the trunk and each branch for the core and the modules. We find it's easier to maintain versions, tags, branches, etc with such a structure. It also enables us to track everything with a single Trac installation. ( http://trac.edgewall.org/ )

我们有一个非常相似的系统,我们使用单个存储库并拆分主干和核心和模块的每个分支。我们发现使用这样的结构维护版本,标签,分支等更容易。它还使我们能够通过单个Trac安装来跟踪所有内容。 (http://trac.edgewall.org/)