简体   繁体   English

硬件 (ECAD)、文档和固件项目的版本控制工作流/架构建议

[英]Version Control Workflow / Architecture recommendations for Hardware(ECAD), Documentation, and Firmware projects

Shall we use SVN or GIT?我们应该使用 SVN 还是 GIT? for the following use case对于以下用例

How shall we organize the system:我们应该如何组织系统:

1: "master repo" containing all the projects and stand alone drivers as that the projects use, each project / driver being a different "branches"? 1:“主存储库”包含所有项目和项目使用的独立驱动程序,每个项目/驱动程序都是不同的“分支”?

example:例子:

MasterRepo
|-Project1
| \---Hardware
|     \--ECAD
| \---Firmware
|     \--src
|     \--includes
| \---Documentation
|-Project2
| \---Hardware
|     \--ECAD
| \---Firmware
|     \--src
|     \--includes
| \---Documentation
|-Drivers
| \---driver1
|     \--src
|     \--includes
| \---driver2
|     \--src
|     \--includes

2: Separate repos for each project and stand alone drivers? 2:每个项目的独立存储库和独立驱动程序? we will need to "pull" or "merge" from the driver repo into the project repo.我们需要从驱动程序仓库“拉”或“合并”到项目仓库。 This is important to show tractability to know which projects are affected in the case of a bug in the driver layer.这对于显示在驱动程序层出现错误的情况下了解哪些项目受到影响的易处理性很重要。

Project1Repo
|---Hardware
|   \--ECAD
|---Firmware
|   \--src
|   \--includes
|---Documentation


Project2Repo
|---Hardware
|   \--ECAD
|---Firmware
|   \--src
|   \--includes
|---Documentation


DriversRepo
|---driver1
|   \--src
|   \--includes
|---driver2
|   \--src
|   \--includes

Shall Hardware be in a separate repo completely?(we are embedded software engineers we need to see schematics and know when there are changes or suggest changes etc. )硬件应该完全在一个单独的仓库中吗?(我们是嵌入式软件工程师,我们需要查看原理图并知道何时有更改或建议更改等。)

Shall each driver be in separate repo?每个驱动程序都应该在单独的仓库中吗?

We are an embedded electronics company, in the automotive industry.我们是汽车行业的嵌入式电子公司。 Until i started the software team did not use any versioning control system, everything was "versioned" via folders and zips.在我开始之前,软件团队没有使用任何版本控制系统,所有内容都是通过文件夹和 zip 进行“版本控制”的。 and the Hardware side of things still use that way of versioning.并且硬件方面仍然使用这种版本控制方式。

We have started using SVN(but not tied to it).我们已经开始使用 SVN(但不依赖于它)。 We are currently for software using the adhoc made-up model of the following:我们目前正在使用以下临时组合模型的软件:

MasterSoftwareRepo
|-Documentation
|-MicroControllerMFG1
| \--FamilyOfMCUs
|    \--Drivers
|    \--Projects
|       \--Project1
|          \--active
|             \--src
|             \--test
|             \--build
|          \--release
|             \--srev1
|             \--srev2
|             \--srev3
|          \--projectSupport
|       \--Project2
|          \--active
|          \--release
|          \--projectSupport
|       \--Project3
|-MicroControllerMFG2
| \--FamilyOfMCUs
|    \--Drivers
|    \--Projects
|       \--Project10
|       \--Project11
|       \--Project13
|-MicroControllerMFG3
| \--FamilyOfMCUs

.......................and so on. 

The system works... Its not pretty, nor is it efficient.该系统有效......它不漂亮,也不高效。 As we have only used the system for say 6 months and have occurred a total repository size of over 40gigs.因为我们只使用了 6 个月的系统,并且已经发生了超过 40gigs 的总存储库大小。 And due to the structure we arnt really using the version control as intended, its more folders with history.并且由于我们没有真正按照预期使用版本控制的结构,它有更多具有历史记录的文件夹。

Also some more background, our team is mid-size but the teams working on each project is very small... 1 software, 1 hardware, 1 mechanical per project.还有一些背景知识,我们的团队中等规模,但每个项目的团队都非常小……每个项目 1 个软件、1 个硬件、1 个机械。 and each of us may have 1-2 projects at a time.我们每个人一次可能有 1-2 个项目。 We have 20 something people in our department.我们部门有 20 人。

So the big idea of merge conflicts due to people working on the same project or file is non-existent as the repos are truly just here to track ourselves, and keep documentation of changes, etc.因此,由于人们在同一项目或文件上工作而导致合并冲突的大想法是不存在的,因为 repos 确实只是在这里跟踪我们自己,并保留更改的文档等。

What are some suggestions for our use case?对我们的用例有哪些建议? The 1 repo idea is too big we believe but we are stuck on the idea of using that so we can pull from the drivers.我们相信 1 repo 的想法太大了,但我们坚持使用它的想法,所以我们可以从驱动程序中提取。 and base project structure etc. so we have full tractability to the beginning.和基础项目结构等,所以我们对开始有充分的可处理性。

Shall Hardware be a separate repo?硬件应该是一个单独的回购吗? can we include it in our repo as a branch or how would we do that?我们可以将它作为一个分支包含在我们的回购中,或者我们将如何做到这一点?

Not using hosted solutions, all solutions need to be self hosted.不使用托管解决方案,所有解决方案都需要自托管。

And yes, I know this is a long post, but I figured the more detail I gave the better you may understand the situation and our usecase.是的,我知道这是一篇很长的文章,但我认为我提供的细节越多,您就越能了解情况和我们的用例。

If you have been using the repository for 6 months and it is already 40 gigs in size, it will likely become too large to easily manage over time.如果您已经使用该存储库 6 个月并且它的大小已经达到 40 g,那么随着时间的推移,它可能会变得太大而无法轻松管理。

For a problem like you are encountering, I would recommend switching over to git - but using git-lfs to manage your binary (non-ascii) files.对于像您遇到的问题,我建议切换到 git - 但使用git-lfs来管理您的二进制(非 ascii)文件。 git-lfs allows users to only have the latest version of a binary file locally - whereas with normal git, all previous versions of every file are stored locally (in a compressed form). git-lfs 允许用户只在本地拥有最新版本的二进制文件 - 而使用普通 git,每个文件的所有先前版本都存储在本地(以压缩形式)。

This would allow you to keep your documentation and ECAD in the same repository - but only see the current/latest version of the files locally.这将允许您将文档和 ECAD 保存在同一个存储库中 - 但只能在本地查看文件的当前/最新版本。

I think the first repository option will be the best solution currently我认为第一个存储库选项将是目前最好的解决方案

MasterRepo
|-Project1
| \---Hardware
|     \--ECAD
| \---Firmware
|     \--src
|     \--includes
| \---Documentation
|-Project2
| \---Hardware
|     \--ECAD
| \---Firmware
|     \--src
|     \--includes
| \---Documentation
|-Drivers
| \---driver1
|     \--src
|     \--includes
| \---driver2
|     \--src
|     \--includes

As for the number of branches - are you able to do all of your testing on the branch from the pull request?至于分支的数量 - 您是否能够从拉取请求中对分支进行所有测试? or do you need your changes to be tested for 1-2 months before determining if they are stable/good?或者您是否需要对您的更改进行 1-2 个月的测试,然后才能确定它们是否稳定/良好?

If the first option is realistic, I think a single 'master' branch would work - where you submit a pull request and do all of your testing on that branch before merging that PR into the main master line.如果第一个选项是现实的,我认为一个单一的“主”分支可以工作 - 在将该 PR 合并到主主线之前,您提交拉取请求并在该分支上进行所有测试。

If the second option is better, you could go with a dual branch structure- one 'master' and one 'stable' - where you have a main development branch that is in testing - and a final release/stable branch where changes will go - once they are proven on the development line.如果第二个选项更好,您可以采用双分支结构-一个“主”和一个“稳定”-您有一个正在测试的主要开发分支-以及一个最终发布/稳定的分支,其中将进行更改-一旦它们在开发线上得到证实。

If in the future you plan on having an extremely large number of projects where even storing a single copy of each file becomes too large you could also look into git submodules (separate repositories but each project repository would contain a pointer to a certain point in time in another repository).如果将来您计划拥有大量项目,即使存储每个文件的单个副本也变得太大,您还可以查看 git 子模块(单独的存储库,但每个项目存储库将包含指向某个时间点的指针在另一个存储库中)。 The last option would be to look into using Virtual File System for git - but this option would limit any git GUI options you may be looking into.最后一个选项是研究将虚拟文件系统用于 git - 但此选项会限制您可能正在研究的任何 git GUI 选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM