English 中文(简体)
SVN - Tags
  • 时间:2024-11-05

SVN - Tags


Previous Page Next Page  

Version Control System supports the tag operation by using that concept that one can give meaningful name to a specific version of the code. Tag allows to give descriptive and memorable names to specific version of code. For example BASIC_ARRAY_OPERATIONS is more memorable than revision 4.

Let us see tag operation with an example. Tom decides to create a tag so that he can access the code more easily.

[tom@CentOS project_repo]$ svn copy --revision=4 trunk/ tags/basic_array_operations

Above command will produce the following result.

A    tags/basic_array_operations/array.c
Updated to revision 4.
A         tags/basic_array_operations

Upon successful completion, the new directory will be created inside the tags directory.

[tom@CentOS project_repo]$ ls -l tags/
total 4
drwxrwxr-x. 3 tom tom 4096 Aug 24 18:18 basic_array_operations

Tom wants to double-check it before commit. Status operation is showing that the tag operation is successful, so he can safely commit his changes.

[tom@CentOS project_repo]$ svn status
A  +    tags/basic_array_operations

[tom@CentOS project_repo]$ svn commit -m "Created tag for basic array operations"
Adding         tags/basic_array_operations

Committed revision 5.
Advertisements