Latest web development tutorials

SVN Lifecycle

This chapter discusses the life cycle of a version control system.


Create Repository

The equivalent of a centralized repository of space for storing all of the work product developers. The repository can not only store files, but also the history of every change that historical changes in each file.

Create operation is used to create a new repository. In most cases this operation is performed only once. When you create a new repository, your version control system will provide you with some information to identify the repository, such as a name and location to create the repository.


Detection

Checkout operation is used to create a working copy from a repository. Working copies are private developer workspaces, you can modify the content, and then submitted to the repository.


Update

As the name suggests, update operation is used to update the repository. This operation will work with a copy of the repository synchronization. Because the repository is shared by the entire team, while the others had submitted their changes, your working copy will expire.

Let us assume that Tom and Jerry are two of the developer of a project. They also checked out the latest version from the repository and start working. At this time, the working copy is fully synchronized with the repository. Then, Jerry very efficient completion of his work and submitted the changes to the repository.

At this time work on a copy of Tom expired. Update operation will pull the latest changes to the working copy Jerry and Tom are updated from the repository.


Executive Change

Once detected, you can do many operations to execute the changes. Editing is the most common operations. You can edit the existing file to, for example, to add a file / delete operations.

You can add files / directories. But these add files directory will not be immediately part of the repository, but is added to the list of pending changes until the commit operation is performed after will become part of the repository.

Likewise you can delete the file / directory. Delete the file immediately removed from the working copy out, but actually deleting the file just been added to the list of pending changes until after the implementation of the commit operation is not really deleted.

Rename operation can change the name of the file / directory. "Move" operation is used to copy files / directories from one place to another repository.


Review Changes

When you check out a working copy or update your working copy, just like your working copy repository completely synchronized. But when you're working copy after some modifications, your working copy is newer than the repository. Before commit your changes operating under review is a good habit.

Status operating lists changes in your working copy undertaken. As we mentioned before, any changes to your working copy will become part of the pending changes list. Status operation is used to view the list of pending changes.

Status operation simply provides a list of changes, but does not provide details of the changes. You can use the diff action to view the details of these changes.


Fix Errors

Let's assume that your working copy to make a number of changes, but now you do not want these changes, and this time will help you revert operation.

Revert operation reset changes in your working copy. It can reset one or more files / directories. Of course, it can also reset the entire working copy. In this case, revert operation will destroy the list and a copy of the work to be changes to the original state.


Resolve conflicts

Combined, they might conflict. Merge operation can be safely processed automatically merge things. Others will be treated as a conflict. For example, "hello.c" file is modified on a branch, on the other branch is deleted. This situation requires human processing. Resolve operation is used to help the user identify the conflict and tells how to deal with these conflicts repository.


Submit changes

Commit operation is used to change from your working copy to the repository. This operation will modify the content repository, other developers can view these changes by updating their working copy.

Before submitting, you must add the file / directory to the list of pending changes. Recorded in the list of the changes it will be submitted. When submitted, we usually provide a comment to explain why these changes. The comments will become part of the history of the repository. Commit is an atomic operation, that is either completely successful commit or rollback failed. Users will not see half of the cases submitted successfully.