Automation of development: parallel development for the majority of developers

Source: Internet
Author: User
Article Title: automation of development: parallel development for the majority of developers. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Although many development teams use the version control system to manage code changes, problems still occur when multiple developers use different code libraries for code encoding in parallel. In this phase of automation development, automation expert Paul Duvall demonstrated how to effectively tag, branch, and merge using an open-source, free Subversion version control system.

When it comes to source code branches, most software development teams can be roughly divided into two camps: some are not branches at all; or there are a large number of branches (or even repositories ), as a result, developers do not know where to sign in for a change-or feel it is painful to merge the changes, so they venture to postpone the job until the software is about to be released.

Always only the operation trunk is the ideal situation. This makes changes that merge two or more code lines less complex. However, in actual software development, you may be developing a future version, or sometimes you may need to prepare a path for a version that has been delivered for use. You need to have the permission to access the source code copy of the released version-but it cannot disrupt the new Code being developed.

 Terms

Trunk (trunk)(Sometimes calledHead) Is used for mainline development ).Branch)It refers to a copy of the code branch, which is used for different changes from the trunk line development.Tag)(Sometimes calledTagIs a copy of the code branch that uses the timestamp, used to identify the code Branch, to return to the marked place during the development cycle.

However, when the development team tries to use separate code lines, the problem arises. In some cases, the development team may choose not to create a branch to avoid delays in publishing or leading to developer bottlenecks. In some cases, developers merge too frequently, resulting in merging conflicts, bottlenecks, and release delays. Adding a branch makes it difficult to navigate to the project repository, causing developers to accidentally change the code that should not be changed.

When the team conducts parallel development, the Code must be merged back to the trunk line (that is, the trunk line) at the highest frequency ). If you cannot merge the code into the trunk frequently, you can run the test to determine whether a merge conflict will occur. This makes merge implementation less difficult. To effectively conduct parallel development, you can use the tags and branches in Subversion (SVN). Subversion is an open-source, free source code management system. By marking, the team can safely return to the previous version of the source code.

I will introduce the following content to demonstrate how to perform parallel development in SVN:

● How to create an SVN version tag from the trunk
● Create an SVN branch based on the version tag
● Merge changes into trunk lines (that is, trunk lines)
● How to Run Continuous Integration (CI) in the development trunk to regularly test the merge of branches and trunk
● Demonstrate how to apply a change from a branch to a trunk
● Example: How to mark the source code of a branch

 About this series

As developers, we are committed to automating user processes, but many developers have neglected to automate their own development processes. For this reason, we have compiledAutomate Development This article is a series of articles devoted to the practical application of software development process automation.WhenAndHowApplication automation is successful.

Figure 1. Parallel Development

As shown in figure 1, effective development occurs between version 1.0.0 and version 1.1.0 of the svn trunk. A group of developers can develop on the branch of version 1.0.1, while other developers are doing online development.

If you want multiple developers to take charge of different code lines, you can use many strategies and techniques. In this article, I will show a very common method that I used in SVN projects.

Configure Subversion for Concurrent Development

Installing and configuring the SVN server is not covered in this article. If you have the permission to access a valid SVN server, you can perform the following steps:

1. Download the SVN client software to your workstation.
2. Create a standard local directory in the workstation.
3. Add the directory to the SVN repository.
4. Submit the directory to the SVN repository.
Download the SVN client software for your operating system from the Tigris.org Web site (see references) and install it on your workstation. Make sure that the SVN executable file is in the system directory of your workstation. Run svn check-out of the Repository using SVN co URL.

Next, create three local directories:

Branch: used to maintain software beyond trunk line development.
Tag: used to identify a change set when software is released for use.
Trunk: used for trunk line development.
Listing 1 shows Windows? , Macintosh, and how to create these directories from the command line on * nix-based systems:


Listing 1. Create a local directory and add it to Subversion

 
$ mkdir branches$ mkdir tags$ mkdir trunk

After creating directories in the operating system, you can use the SVN add and commit commands to add them and submit them to SVN. In the directory where I created the directory in Listing 1, I entered the command shown in Listing 2 (replace the user credential when appropriate ):


Listing 2. Add and submit the local directory to the remote SVN Repository

 
$ svn add *.*$ svn commit -m "Setting up standard SVN branches, tags and trunk directories" \  --username tjefferson --password Mont!cello 

After the operations in Listing 1 and 2 are executed, the SVN repository should be similar to Figure 2:


Figure 2. Standard SVN directory created in the repository

After the basic SVN repository is ready, you can create a version tag.

[1] [2] [3] [4] [5] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.