SCM 的一些歧义
在阅读关于修订控制的维基百科文章文章时,我发现了一些似乎定义不明确的术语,并且想知道它们在现实世界中是如何实际使用/应用的。具体来说:
- “主线”与“基线”
- “分支”与“流”
- “签出”与“更新”
- “供应商”文件夹与工件存储库(如Maven或Ivy)
我是一个上下文学习者,所以你可以给出的任何具体例子都会帮助灯泡更好地打开。
关于最后一个,我的意思是:
至少在 svn
中,具有以下 VC 项目结构是相当标准的:
svnrepo/
someProject/
trunk/
branches/
tags/
vendor/
其中 vendor/
是一个地方放置您的配置所依赖的外部/第三方依赖项。或者,我见过开发人员使用 Maven 或 Apache Ivy 等工具从存储库(例如 SFTP 服务器)拉取/发布工件(JAR 等)。 那么,您何时将第 3 方依赖项放入 SCM 中的 vendor/
下,以及何时将这些依赖项放入 Maven/Ivy 存储库中?
提前感谢您对任何问题的澄清这些物品!
In reading the wikipedia article article on revision control, I found some terms that seem ambiguously-defined, and was wondering how they are actually used/applied in the real world. Specifically:
- "Mainline" vs "Baseline"
- "Branch" vs "Stream"
- "Checkout" vs "Update"
- "Vendor" folder vs artifact repo (like Maven or Ivy)
I am a contextual learner, so any concrete examples you could give would help the lightbulbs turn on a lot better.
With regards to the last one, what I mean is this:
At least in svn
it is fairly standard to have a VC project structure of:
svnrepo/
someProject/
trunk/
branches/
tags/
vendor/
Where vendor/
is a place to put external/3rd party dependencies that your configurations rely on. Alternatively, I've seen developers use tools like Maven or Apache Ivy to pull/publish artifacts (JARs and such) to/from a repository, such as an SFTP server. So when do you put 3rd party dependencies in your SCM under vendor/
, and when do you put these dependencies in your Maven/Ivy repo?
Thanks in advance for clarification on any of these items!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“主线”与“基线”:
第一项是一种特殊的分支,它记录代码的演变,通常是生产中看到的代码。请参阅本章。
第二个术语是关于标签(设置在组件的所有文件上,即一组连贯的文件)
“分支”与“流”:
分支没有层次结构(您有一个分支列表,并且可以从任何分支合并到任何分支)。流具有层次结构,其中允许定义 合并工作流程。
“结帐”与“更新”
Checkout 查询文件的特定版本并将其复制到磁盘上。
更新将确保磁盘上的所有元素对于当前选择规则都是最新的。
工件存储库不提供版本控制功能,例如合并、差异、分支。
供应商是 VCS 中的专用分支(我认为应该避免:二进制文件是在 VCS 中不受欢迎,除非某些原因)
您应该尝试将供应商库保留在 VCS 之外,仅对记录第三方库所需的配置(即标签列表)的
pom.xml
(例如)进行版本控制。"Mainline" vs "Baseline":
The first term is a special kind of branch, which record the evolution of code, usually the one as seen in production. See this chapter.
The second term is about a label (set on all the file of a component, ie a coherent set of files)
"Branch" vs "Stream":
Branches have no hierarchies (you have a list of branches, and you merge from any branch to any branch). Streams have a hierarchy, which among other things allows for the definition of a merge workflow.
"Checkout" vs "Update"
Checkout queries a specific version of the files and copy it on the disk.
Update will make sure all the elements on the disk are up-to-date for the current selection rules.
An artifact repo doesn't offer versioning features like merging, diff, branches.
A Vendor is a dedicated branch in a VCS (and should be avoided in my opinion: binaries are not welcomed in a VCS, unless for certain reasons)
You should try to keep vendor libs outside of the VCS, only versionning the
pom.xml
(for instance) which records the configuration (ie list of labels) you need for the third-parties libraries.