Branching (software)
Encyclopedia
Branching, in revision control
Revision control
Revision control, also known as version control and source control , is the management of changes to documents, programs, and other information stored as computer files. It is most commonly used in software development, where a team of people may change the same files...

 and software configuration management
Software configuration management
In software engineering, software configuration management is the task of tracking and controlling changes in the software. Configuration management practices include revision control and the establishment of baselines....

, is the duplication of an object under revision control (such as a source code file, or a directory tree) so that modifications can happen in parallel along both branches.

Branches are also known as trees, streams or codelines. The originating branch is sometimes called the parent branch, the upstream branch (or simply upstream, especially if the branches are maintained by different organisations or individuals), or the backing stream. Child branches are branches that have a parent; a branch without a parent is referred to as the trunk
Trunk (software)
In the field of software development, trunk refers to the unnamed branch of a file tree under revision control. The trunk is usually meant to be the base of a project on which development progresses. If developers are working exclusively on the trunk, it always contains the latest cutting-edge...

or the mainline.

In some distributed revision control systems, such as Darcs
Darcs
Darcs is a distributed revision control system created by David Roundy; it was designed to replace traditional, centralized source control systems such as CVS and Subversion...

, there is no distinction made between repositories and branches; in these systems, fetching a copy of a repository is equivalent to branching.

Branching also generally implies the ability to later merge or integrate changes back onto the parent branch. Often the changes are merged back to the trunk, even if this is not the parent branch. A branch not intended to be merged (e.g. because it has been relicensed under an incompatible license by a third party, or it attempts to serve a different purpose) is usually called a fork
Fork (software development)
In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software...

.

Motivations for branching

Branches allow for parts of software to be developed in parallel. Large projects require many roles to be filled, including developers, build managers, and quality assurance
Software quality assurance
Software quality assurance consists of a means of monitoring the software engineering processes and methods used to ensure quality. The methods by which this is accomplished are many and varied, and may include ensuring conformance to one or more standards, such as ISO 9000 or a model such as...

 personnel. Further, multiple releases on different operating system platforms may have to be maintained. Branches allow contributors to isolate changes without destabilizing the codebase, for example, fixes
Patch (computing)
A patch is a piece of software designed to fix problems with, or update a computer program or its supporting data. This includes fixing security vulnerabilities and other bugs, and improving the usability or performance...

 for bugs, new features
Feature (software design)
The Institute of Electrical and Electronics Engineers defines the term feature in IEEE 829 as "A distinguishing characteristic of a software item ." - Feature-rich :...

, and versions integration
System integration
In engineering, system integration is the bringing together of the component subsystems into one system and ensuring that the subsystems function together as a system...

. These changes may be later resynchronized after testing.

Development branch

A development branch or development tree of a piece of software is a version that is under development
Software development
Software development is the development of a software product...

, and has not yet been officially released. In the open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 community, the notion of release is typically metaphorical, since anyone can usually check out any desired version, whether it be in the development branch or not. Often, the version that will eventually become the next major version is called the development branch. However, there is often more than one subsequent version of the software under development at a given time.

Some revision control systems have specific jargon for the main development branch; for example, in CVS, it is called the "MAIN". A more generic term is "mainline".

Shadow or magic branches

In cvc and CVSNT
CVSNT
The CVSNT Versioning System implements a version control system: it keeps track of all changes in a set of files, typically the implementation of a software project, and allows several developers to collaborate...

, a shadow or magic branch "shadows" changes made in the upstream branch, to make it easier to maintain small changes. (cvc is an open-source package building system incorporating a revision-control system for packages produced by rPath
RPath
rPath, Inc. is a technology company based in Raleigh, North Carolina that provides a platform for enterprise IT organizations, independent software vendors and on-demand service providers to automate the process of constructing , deploying and updating software stacks across physical, virtual and...

.)

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK