什么是“分支”,“标记”?和“行李”在Subversion仓库中意味着什么? [英] What do "branch", "tag" and "trunk" mean in Subversion repositories?

查看:99
本文介绍了什么是“分支”,“标记”?和“行李”在Subversion仓库中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Subversion(我想是通用存储库)的讨论中,我经常看到这些词。

在过去的几年中,我一直在项目中使用 SVN ,但是我从未完全理解这些目录的完整概念。

I've seen these words a lot around Subversion (and I guess general repository) discussions.
I have been using SVN for my projects for the last few years, but I've never grasped the complete concept of these directories.

它们是什么意思?

推荐答案

嗯,不确定我是否同意Nick re标签与分支相似。标签只是标记

Hmm, not sure I agree with Nick re tag being similar to a branch. A tag is just a marker

  • Trunk would be the main body of development, originating from the start of the project until the present.

分支 将是从主干中某个点派生的代码副本,用于在保留代码完整性的同时对代码进行重大更改。行李箱中的代码。如果重大更改按计划进行,则通常会将它们合并回主干。

Branch will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the code in the trunk. If the major changes work according to plan, they are usually merged back into the trunk.

标签 将是您希望保留的主干或分支上的时间点。保留的两个主要原因是:这是该软件的主要发行版(无论是alpha,beta,RC还是RTM),还是这是该软件在应用主干上的主要修订之前最稳定的点。

Tag will be a point in time on the trunk or a branch that you wish to preserve. The two main reasons for preservation would be that either this is a major release of the software, whether alpha, beta, RC or RTM, or this is the most stable point of the software before major revisions on the trunk were applied.

在开源项目中,项目涉众未接受的主要分支机构可以成为的基础分支-例如,与其他源代码具有共同起源的完全独立的项目。

In open source projects, major branches that are not accepted into the trunk by the project stakeholders can become the bases for forks -- e.g., totally separate projects that share a common origin with other source code.

在下面,branch和tag子树与主干区分开来方式:

The branch and tag subtrees are distinguished from the trunk in the following ways:

Subversion允许系统管理员创建 hook脚本,当某些事件发生时,该脚本将触发执行。例如,对存储库进行更改。典型的Subversion存储库实现通常将包含 / tag /的任何路径创建后都进行写保护。最终的结果是,标签一旦创建便是不可变的(至少对于普通用户而言)。这是通过挂钩脚本完成的,如果 tag 是已更改对象的父节点,则它们会通过阻止进一步的更改来增强不变性。

Subversion allows sysadmins to create hook scripts which are triggered for execution when certain events occur; for instance, committing a change to the repository. It is very common for a typical Subversion repository implementation to treat any path containing "/tag/" to be write-protected after creation; the net result is that tags, once created, are immutable (at least to "ordinary" users). This is done via the hook scripts, which enforce the immutability by preventing further changes if tag is a parent node of the changed object.

Subversion从1.5版开始,它还增加了与分支合并跟踪有关的功能,以便可以将对分支所做的更改重新合并到主干中,并支持增量的智能合并。

Subversion also has added features, since version 1.5, relating to "branch merge tracking" so that changes committed to a branch can be merged back into the trunk with support for incremental, "smart" merging.

这篇关于什么是“分支”,“标记”?和“行李”在Subversion仓库中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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